Dec
21
Hey everyone. Sorry I haven’t been posting much lately. I’ve been working on another project that has been taking most of my time. My girlfriend has been in town the past few weeks visiting as well. So most of my time outside of work is already spoken for.
The project I’ve been working on is a web based front end to my router box written in PHP. First, the router isn’t your standard store bought model. It’s a little beefier to say the least. The router is actually a Pentium III 650MHz w/256 MB of RAM running Fedora Core 6. I built it a little over a year and a half ago to learn more about routing using Linux. But more specifically, I wanted to learn more about iptables. It has served well as a learning device. But, I really can’t say that I understand everything as much as I’d like to.
So, the other night I got bored and decided to try some packet sniffing on my network to see what was going on while I was at work. What I didn’t really realize was that the sniffer I chose to use (ettercap) disabled ip forwarding. Not a good thing to disable on your router. I had to call my girlfriend and have her hook a monitor and keyboard up to the machine, then find the script, then run it. Not an easy task for someone whose passion is painting and not linux. I have to say she did a good job for being totally clueless as to what she was doing. After that mutual headache, I decided I needed an easier way run the script than logging in locally.
I decided the best way to do this would be to create a web based interface. I figured using PHP would be preferable. This is something I had never done before. And to be honest, I was fairly intimidated. The extent of my PHP knowledge consisted of using passthru to run whoami to see what user php scripts were being executed by. Well, it was actually a lot easier than I had thought it would be. I’ve put about 8 hours into the project thus far and I have implemented an inbound and outbound IP blocker, DHCP host adder, and Squid ACL adder. Information about the system is also displayed, such as the kernel, disk and memory usage, and bandwidth graphs on both LAN and WAN interfaces. I’ve included a screen shot of the main page after the jump for anyone interested. Its not very pretty, but its at least functional. Anybody have any good names for this concoction?

