Hard reset of an ADSL Modem

I saw someone posted a speed test in one of my rss feeds. After doing the test myself I realised that I was only getting half of my alloted speed.

SpeedTest.Net Before

I hard reset of the ADSL modem and the restored my settings the speed jumped to something more acceptable.

SpeedTest.Net After

It’s still not the advertised 2oMb/s but it’s fast enough.

Posted in General | 1 Comment

Wikipedia text to speech

This weekend I’ve wanted to look some things up on Wikipedia but as it was such nice weather I didn’t want to be cooped up inside. My trusty Acer Aspire One has developed a problem with it’s solid state drive following (but possibly not because of) installing Ubuntu Netbook Remix so I was left with my ogg player as my only option. I could have used the web based service pediaphon to convert the files but I want a command line option that I could run on my own computer. The solution is a good example of the Unix philosophy of chaining the output of several special purpose commands together to do a job.

Here’s the code:

echo "What do you want me to lookup for you on Wikipedia ?"; \r
read line; \r
wget -q http://en.wikipedia.org/wiki/"${line}" -O - | \r
html2text -nobs -ascii -o -| \r
espeak --stdout | \r
ffmpeg -i - "${line}.ogg"

Let’s break it down. First we ask the user to enter a search term. Then we have wget get the url from wikipedia. We are taking advantage of the fact that Wikipedia has very predictable URL’s. The "-q" tuns off verbose output while the "-O -" tells wget to send the output to standard output. This outputs a raw html file which pipe into html2text to remove the additional markup.

By default html2text will try and output additional formating that is understood by pager programs like less and more. In our case we do not want that so we will use the switches "-nobs -ascii" to suppress hidden formating and to use a simpler encoding standard. The next option "-o -" will pass the cleaned text to standard output which we then pipe to espeak.

eSpeak is a compact open source software speech synthesizer that is in the default ubuntu repositories and I found it a lot easier to setup than festival but more importantly it handles redirection a lot easier. The only option I need to use is the "--stdout" to tell it to speak the incoming text and send the wav output to our old friend ffmpeg.

The " -i -" tells ffmpeg to read a wav data stream from standard input. The "${line}.ogg" tells it to save the spoken text to a ogg file with the same name as the search term the user entered. While the audio takes a bit of getting used to it is a good way to actually learn something useful.

Posted in General | Tagged , | 1 Comment

HPR episode on RTFM Released

In this months Hacker Public Radio episode 340 I discuss the origins of the acronym RTFM. While the use has negative connotations there is merit in downloading and reading manuals all be it for education but also for reference. Any good disaster recovery policy should also include a the manuals for your hardware.

Posted in Podcasts | Leave a comment

AutoNessus English Screencast

At the end of our Hacker Public Radio episode 298 on AutoNessus we promised that Frank would release a screen cast of the presentation he gave at the Dutch Linux Users Group NLLGG on the 7th of February. I am delighted to report that Frank has just published the screencast over at the Internet archive under a Creative Commons Attribution-Share Alike 3.0 license. In the presentation Frank walks you through using this GPLv3 tool. You can watch it here or download the Ogg(19Mb) or the MPEG4 (43Mb) version.

Posted in Podcasts | Tagged | Leave a comment

HPR Episode on autonessus

I attended a presentation on AutoNessus at the Dutch Linux Users Group NLLGG on the 7th of February last. I managed to record an interview with the author Frank Breedijk who works as a Security Engineer for Schuberg Philis and it’s just been released as a Hacker Public Radio episode.

Autonessus is a tool that you can use not only to automate your Nessus security scans but  more importantly it is a valuable tool in helping you to digest the findings that are produced.

In the interview Frank gives a background to Nessus and he explains why AutoNessus is a useful tool for helping you decipher the results of an initial scan. This is an invaluable tool for those who regularly scan their own networks as it will allow you to focus on the issues that have changed. Whither the change is for the better or worse you will still have to decide yourself but at least you don’t need to wade through any of the findings that are unchanged from the last scan.

Towards the end of the interview we go through the roadmap and discuss why it was released under the GPLv3. Frank is working on a English screencast demo and I’ll keep you posted once it’s available.

Posted in Podcasts | Tagged , , | Leave a comment

How to mirror RHN behind your firewall.

I was just listening to episode 283 of  The Linux Link Tech Show and Linc asked if it was possible to mirror channels from the RedHat Network behind a firewall. RedHat offers the RHN satellite server and the RHN Proxy Server to do this however may people find these solutions complicated.

You may want to manage your own local RHN repository if your servers are prevented from communicating with the Internet or you wish to carefully control software updates through a  DTAP (Design -> Test -> Acceptance -> Production) process. Whatever the reason please make sure you support RedHat by having a subscription for each and every server that you update. If you are not able to afford it please use CentOS instead and you will be able to achieve the same thing for free but without RedHat support. CentOS uses the same code base as RHEL but with the RedHat Trademarks removed.

First register the gateway server with the RedHat Network

rhn_register --nox

If you need to go through a proxy server use

rhn_register --nox --proxy=myproxy:8080

Install the yum-utils package from the RHN.

yum install yum-utils

After this is installed you will be able to use the reposync command to download the channel locally. You can use  “yum repolist” to get a list of the channels you are subscribed to. I’m assuming that you are subscribing to the RedHat Enterprise Linux 5 64 bit version for this example. You can download as many channels as you like if you have the subscription and the disk space.

reposync -p /opt/mylocalrepo/ --repoid=rhel-x86_64-server-5 -l

Now you can yummify the local directory using the createrepo command. This goes through all the RPM’s and extracts version and dependency information which it uses to generate XML metadata files that the yum command can understand.

createrepo /opt/mylocalrepo/

If you add your own RPMs or RPM’s from EPEL, DAG, etc to the repository then you need to re-run the createrepo command. A sub directory will be created called getPackage that holds all the RedHat RPM’s. You can add your own RPM’s where you like under the channel directory and they will will be picked up by the createrepo command.

Point apache at the local directory so that it’s accessible from an internal url e.g: http://myserver.local/myrepo/. You could also use NFS or FTP if you prefer.
Once that is done you can distribute a yum config file for your new repo to /etc/yum.repos.d/my.repo on all the internal servers.

[rhel-myrepo]
name=My Red Hat Enterprise Linux $releasever - $basearch
baseurl=http://myserver.local/myrepo/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

All going well you should be able to see your new repo with the command

>yum repolist
Loading "security" plugin
repo id     repo name                                status
rhel-myrepo My Red Hat Enterprise Linux 5Server - x  enabled

You can now disable the Red Hat network by setting enabled = 0 in  /etc/yum/pluginconf.d/rhnplugin.conf to prevent the server trying to connect directly to the RHN. It’s probably safe to turn the Red Hat Network updates service (rhnsd) off while you are at it.

All the RPM packages from the RHN channel you are subscribed to and your own RPM’s are available as one seamless whole. Now you can use yum to manage your internal servers and dependencies should be resolved from within the entire repository.

The following command will clean out yum’s cache and remove old header information

yum clean all

Next you can list all packages with updates available in the yum repositories.

yum list updates

If you’re happy then you can update the entire machine by running the command

yum update

While updating packages, yum will ensure that all dependencies are satisfied.

EDIT: Added info about “yum repolist” and getPackage following feedback from Linc. He also suggests that a  “reposync -l” is enough to download the packages for the channels and he is using “reposync -n -l” in his crontab. I’m testing this now.

Posted in General | 34 Comments

HPR Interview with Ian Southam Released

The cfengine interview with Ian Southam has been released and you can hear it here

Posted in Podcasts | Tagged | Leave a comment

HPR cfengine an interview with Ian Southam

I had the privilege of attending a presentation on cfengine by Mark Burgess at Schuberg Philis last December. I had just started using the tool and the presentation really helped to explain the philosophy behind the tool. So for this months Hacker Public Radio show I snagged a interview with Ian Southam who is a Mission Critical Engineer at Schuberg Philis. Ian has been using the tool since the 90’s and explains what it does and how it can help you manage your servers.

Overview of CFengine
http://en.wikipedia.org/wiki/Cfengine

The Promise of System Configuration: Google Tech Talks – November 5, 2008
http://www.youtube.com/watch?v=4CCXs4Om5pY

A simple overview of cfengine: Debian Administration
http://www.debian-administration.org/articles/223

Centralized Host Configuration With Cfengine: Sun BigAdmin System Administration Portal
http://www.sun.com/bigadmin/features/articles/cfengine_part1.html
http://www.sun.com/bigadmin/features/articles/cfengine_part2.html

Ian Southam:
http://www.schubergphilis.com/

Posted in Podcasts | Tagged | Leave a comment

Fantastic discussion by Eben Moglen on Origins of Copyright and Patents

I just finished listening to a brilliant discussion by Eben Moglen on Origins of Copyright and Patents over at the The Software Freedom Law Show. He goes through step by step why things are as they are and why the need to be changed. I’m not sure if you’ll agree with all of this but I recommend you take an hour to listen to the show.

http://www.softwarefreedom.org/podcast/2009/jan/20/0x05/

Posted in Podcasts | Leave a comment

The Samsung YP-U3

This months HPR is out and this time I spent some time talking about the evils of and where to see

I have gone through a few players now and my selection criteria in a portable music player is pretty specific. It needs to be solid state, rugged enough to take outside, be under €100 and most importantly be able to play the ogg format. Even though most of my music collection is in the mp3 format I’m slowly moving to ogg for everything. I have the Samsung YP-U2 and it’s a nice little music player although I mostly listen to podcasts on it.

My wife also had one but the on switch died so after checking to see what media player supports the ogg format I ordered the Samsung YP-U3. The xiph.org forum warned that it comes with media transfer protocol firmware and to get around this you need to install the International Firmware using the description for U3J MTS mode.

Posted in Podcasts | Leave a comment