Not long ago I was curious about using Java to look up DNS information so I decided to put together a little DNSBL/RBL checker so I could experiment with Java DNS lookups and some PHP/Java communications. There isn't a lot of Java DNS stuff out there but it was easy to tell that the tool for this job is the DNSJava library.
So after doing my yum upgrade from FC5 to FC6 on a desktop I decided to see if it worked any better than FC5 on my old Dell Inspiron 600m laptop. FC5 wasn't bad on this laptop but two things always bugged me: 1) the ATI driver didn't work out of the box at anything above 800×600 so I had to wait for the binary ATI drivers to support chipset and then install that and 2) sleep in any form just didn't work correctly. I'm happy to say that both of these things are fixed in FC6.
Now that Fedora Core 6 is available it is time to upgrade those old crusty FC5 installs. To upgrade from FC5 you can follow these steps:
- You may be able to skip this step but I did a yum update on FC5 first to make sure everything there was up to date and worked before moving to FC6.
- Do a "yum clean all" to remove all the old yum cruft.
- Install the fedora-release for Fedora Core 6. Use the rpm command:
rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-6-4.noarch.rpm http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/fedora-release-notes-6-3.noarch.rpm
- Run the yum update: yum -y update. At this point I had to remove a few packages to get past dependency issues they weren't important and I just added them back after the update.
If you are still on FC4 you can upgrade from FC4 to FC5 first.
Tags: fedora, upgrade, yum, linux
At work we have been using DNS Black Lists for a long time to deny spam coming into our email systems. There are a number of places you can check to see if you are on one of these lists but I figured I would write my own web 2.0 version. So here it is my own DNSBL checker. I believe it has most of the major lists on it but if I find more I'll add them. I'm also going to try to post more about how it is all put together.
For the longest time having POP3 messages stored in one large file bothered me. I found out however that you can easily convert the single file storage into Maildir style storage with fetchmail and procmail. Here are the steps I used to fetch mail from a POP3 mailbox and store the messages in Maildir style folders.
On a number of occasions I've wanted to map a section of a site hosted with lighttpd onto a single PHP file that could then be used as a controller. Here is how I go about doing it.
The first part is to re-write the given part of the site to the PHP file you want to be the controller. Add the following to your configuration file:
url.rewrite = (
"^/(.*)" => "/controller.php"
You can then start with a simple example to see where you will get your URL information from:
The $_SERVER["REQUEST_URI"] value will be the requested URI. You can now break it up into multiple parts with explode:
$urlParts = explode("/", $_SERVER['REQUEST_URI']);
At this point you have an array of the URI parts and can map those however you want using PHP.
Tags: PHP, lighttpd
After my last post on limiting bandwidth usage on a Xen node I thought I would follow up with how to monitor the bandwidth usage of a Xen node.
Xen seems to be gaining speed these days and has a lot of useful features for those who want to resale or otherwise split a single box. Now that you have your Xen system set up you may be interested in going farther with bandwidth limiting.
The hardest part of setting up bandwidth limiting is understanding the traffic control system under Linux. This mainly revolves around the tc command.
I recently needed to replace twm as the window manager I used under VNC. I wanted something light so I looked at: blackbox, fluxbox, and flwm. These window managers have been around for some time and are probably available as binary packages for most distributions.
On a number of occasions I've used RRDTool to graph network traffic and the like. A few years ago when I started using cacti I started wondering how to make the graphs myself. Creating the graphs on the command line isn't that hard once you know how to set things up and it turns out doing the same in PHP is just as easy.