Dec
22
Rogue DHCP Detection Plugin for Nagios on RedHat
Filed Under Computers & Tech, Software Development, Security, My Projects on December 22, 2006 | 9 Comments
I’m pretty sure this is useless on most versions of Linux because the default DHCP plugin that comes with the Nagios Plugins distribution has this functionality and seems to work just fine everywhere except on RedHat-based distros like RHEL, Centos and Fedora Core. On these systems the default plugin does not seem to work and fails to detect any DHCP servers. This plugin is different to the one I gave instructions for before which tests whether a particular DHCP server is answering requests, this plugin finds rogue servers, it will not alert you if any of your actual DHCP servers are down. Hence, you should probably install both. This plugin is not very polished, it is rough and ready but I know it works on RHEL4. If you’re running a different system you may have to do some minor tweaks but this should serve as an excellent starting point none-the-less.
[tags]Nagios, DHCP, RedHat, RHEL, CentOS, Fedora, Linux[/tags]
Dec
21
Some Silliness for the Silly-Season
Filed Under Computers & Tech on December 21, 2006 | 2 Comments
If you’re the serious kind who wouldn’t dream of wasting their precious CPU cycles on pointless fluff or if you can’t stand kitsch then you should probably just stop reading now, this won’t be of any interest to you what so ever. If you on the other hand, you have an over-abundance of festive spirit and some spare CPU cyles (and you run OS X) then MacLampX is just the thing for you.
Dec
20
Problems Detecting Rogue DHCP Servers on Linux, not on Windows
Filed Under Computers & Tech on December 20, 2006 | 7 Comments
I am by no means shy about pointing out problems with Windows on this blog but I do try to be objective in my criticism. Today I have the rare pleasure of sharing a Windows command-line tool that I haven’t been able to find an equal to on RedHat Enterprise Linux (RHEL) 4. A few weeks ago a rogue DHCP server caused us some serious problems at work so I was asked to find a simple tool for detecting rogue servers. In theory there are loads of tools for this on Linux but after having tried everything Google was able to find for me (an entire day’s work) I’d still drawn a blank. Everything I tried insisted that our main DHCP server did not exist. What’s more tcpdump
showed responses from the DHCP server arriving at the machine but all the tools insisted they got no reply regardless. In my search I did come across dhcploc.exe, a small MicroSoft command-line tool that ships with most versions of Windows. Granted, it’s not part of the default install but it is on the CD none the less and more importantly it works!
[tags]Windows, RedHat, RHEL, DHCP, Rogue DHCP Servers[/tags]
Nov
28
The Easy Way to Completely Remove an App on OS X
Filed Under Computers & Tech, System Administration on November 28, 2006 | 4 Comments
There are two ways of dealing with the configuration details that applications need to store. You have the Windows model, throw the lot into the Registry, and the Linux/Unix model, use text files in people’s home directories. There are advantages and disadvantages to both, but on balance, I prefer the Linux/Unix model. Apple have taken the Linux/Unix approach but rather than storing the configuration files in straight in your home directory OS X stores them in the Library
folder within your home directory. Although 99% of an application is gone when you drag it to the trash can, the configuration files in your Library are left behind. These take up very little room and don’t really get in your way but you might still like to get rid of them. If you’re the kind of person who is constantly installing and removing applications to test and play them you probably should look into tools for completely removing applications.
On the Mac there are two tools for this that I am aware of, AppZapper and AppDelete. It was Allison Sheridan of the NosillaCast that put me on to AppDelete. Like Allison I’ve played with both and agree that AppDelete is the better App of the two. It’s UI is the hight of simplicity, but perhaps so simple it may confuse people (more on this later). It also allows you to see what will be deleted and to un-do the deletion so there should be no nasty surprises! This is the perfect example of a tool that solves one problem very well. Basically, it does exactly what it says on the tin!
Nov
26
arRsync – an Rsync GUI for Mac OS X
Filed Under Computers & Tech on November 26, 2006 | 48 Comments
When it comes to efficiently synchronizing data between hard-drives there is a great Unix/Linux command-line tool, rsync
, which is installed on OS X Tiger (and perhaps previous versions too) by default. OS X only contains the command-line tool though, not a GUI to provide easy access to it. This is where arRsync comes in. All it does is provide a simple GUI and the ability to store profiles, but that’s all that’s needed to make rsync
available to regular users. You might wonder why you would need to efficiently synchronize data between two hard-disks? The answer, backups! I use rsync
(via arRsync) to backup all my important data to external hard-drives. The nice thing about rsync
is that it only replaces files that have changed, so even if you have hundreds of GigaBytes of data, you’ll still be able to update your backup in a reasonable time. Oh, and arRsync is both free and open-source!
[tags]Backup, arRsync, Rsync, OS X[/tags]
Nov
24
Nagios DHCP Checking on RHEL4
Filed Under Computers & Tech, System Administration on November 24, 2006 | 4 Comments
One of my current projects in work is to set up a Nagios install to monitor our network. We have been monitoring with the free version of BigBrother for a while now but BB isn’t as good so we’re switching to Nagios. I had plenty of problems getting Nagios running on RHEL 4 because in work we try to do as much as possible using only RPMs. I’m working on simple how-to for setting up Nagios on RHEL4 which I’ll publish here soon but the base install does not give you DHCP monitoring. I tried to look for RHEL rpms that provide check_dhcp
but I couldn’t find any. There were lots for Fedora but they don’t work on RHEL (I tried FC4 and 5 rpms). I tried to manually build the latest version of the Nagios plugins which do contain a check_dhcp
binary but there is a problem with that binary that results in it always showing your DHCP server as down. I know the problem is with the binary because if I watch the logs on the DHCP server I see it issuing an offer and tcpdump
on my Nagios server shows the offer arriving, yet the plugin still insists that the service is down. The solution is to use this Perl script. However, if you follow the instructions on that page it won’t work on RHEL. I spent an entire day beating this script into submission but in the end I got it working.
[tags]Nagios, RedHat Enterprise Linux, RHEL, RHEL4, DHCP[/tags]
Nov
21
Java Class Loaders & Configuration Files -Why Wasn’t I Taught This in College?
Filed Under Computers & Tech, Software Development on November 21, 2006 | 11 Comments
I’ve often complained that students don’t get taught the important stuff they’ll need for programming in the real world when they study for computer science or even software engineering degrees. I was pretty sure I’d brushed up on my Java enough that I had all I needed to write Java code in the real world but I was proven very wrong over the weekend when I spent literally an entire day on what turned out to be one line of code. The problem was that I had a gaping hole in my understanding of how the JVM works and how programs can interact with it, I was totally ignorant of the power of Class Loaders.
Nov
17
Java Goes Open Source – So What?
Filed Under Computers & Tech, Software Development on November 17, 2006 | 3 Comments
Java going Open Source is old news at this stage but it’s taken me a while to digest. Ideologically I think it is a great move, I’ve always been a little annoyed that Java was not GPL or similar. So it’s good for me as an Open Source fan, but is it also good for me as a Java Programmer? That’s what I’ve been trying to figure out for the last few days and in the end, I think it is.
[tags]Java, Sun, Open Source, GPL[/tags]
Nov
14
Installing mod_jk for Apache 1.3 on Mac OS X 10.4 Tiger
Filed Under System Administration, Computers & Tech on November 14, 2006 | 8 Comments
I’ve done a few previous articles on Apache Tomcat (one for installing it on Linux and one for installing it on OS X), but I haven’t yet mentioned installing the JK Connector (mod_jk
) in any environment. For those who are wondering what on earth I’m on about, mod_jk
allows the Apache web server to serve your Tomcat web apps so they appear on port 80. There are a number of reasons why you might want to do this. Firstly, it provides a simple and secure way to get Tomcat to respond to requests on port 80 without having to have it run as root. Apache is more efficient at serving static pages so it can help increase the efficiency of your web app, and finally it allows you leverage all the power of Apache’s many features for your Java web app.
[tags]Tomcat, Apache, OS X, Mac, mod_jk, Tomcat Connectors[/tags]
Nov
14
DigiWeb Asks for Credit Card Details via Email
Filed Under Computers & Tech on | 6 Comments
I was horrified to receive an email from my ISP asking me to email them my updated credit card details this morning. Now, before you go saying ‘no ISP would do that, its obviously a phising scam you fool’, it isn’t. I rang them. Since my credit card had expired I gave them my new details first and then complained about the email. The person on the other end of the phone just didn’t see the problem. I proceeded to explain that email is a totally insecure transport medium. She still didn’t see a problem because they were ‘only offering customers an option to email’. DigiWeb are an ISP, people expect ISPs to know how the internet works, and if their ISP says it’s OK to email such things then regular users will probably take them at their word. After all, DigiWeb are the experts right? When it became clear that I was not being listened to I asked to be transfered to a manager or a supervisor but was told that DigiWeb don’t take complaints over the phone. What? You don’t even care enough to talk to your own customers? Yet another example of the utter uselessness of Irish ISPs! To cut a long story short I’ve contacted the Data Protection commissioners and am in the process of lodging a complaint.