Systems Administration

Intercept HTTP requests with Squid

Posted in Systems Administration on April 20th, 2011 by Jeff – Be the first to comment

On one of my projects we had some questions about how much bandwidth was being used by requests to a third party service but we didn’t have any a view beyond general traffic on the network interface. I hit upon the idea of using a transparent proxy to log requests then use log analysis to break out data transfer amounts per third party service. And since we already had squid as part of our infrastructure applications it seemed like a good choice.

The tricky part of this setup is that everything is hosted on the same hardware node and we also have some web services that needed to be left untouched. These requirements implied some network configuration using iptables to force outbound web requests through the proxy.
read more »

Unix CLI Command Repository

Posted in Computing, Systems Administration on February 5th, 2009 by Jeff – Be the first to comment

I just found the Command Line Fu command repository via reddit.com. Tons of very useful commands for a variety of tasks.

For those that might not be a *nix sysadmin, you’re missing the joy of firing off scripts from the command line that can do an extraordinary amount of work in a short amount of time. I was a veritable hero early in my career when I was able to help a client replace a copyright string in some 5000 files and create backups with this one:

find . -type f -name '*.html' | xargs grep -l '©' | xargs perl -pi.bak -e 's/©1997/©1999/g'

Or something like that.

Regardless, the client was amazed and happy that one could work such magic in just a few minutes and the content in the Command Line Fu repository looks chock full of opportunities to amaze folks with your wizardry.

New Web Site, Again

Posted in News, Systems Administration on January 31st, 2009 by Jeff – 2 Comments

I’ve setup a new blog on a new server for a variety of reasons, mostly having to do with it being a terrible idea to host on my home network. I’ve chosen a hosting service provider rather than hosting it on my own hardware. I’m using Slicehost for now. It’s fairly inexpensive (not the cheapest by far), has a good amount of positive buzz around it and they use operating system virtualization. This is cool since I get full control of my “slice” (Ubuntu) just like a regular server but upgrades are done through a web-based management console so I don’t have to drive to a Denver hosting facility to do maintenance. If I need to upgrade memory or storage I can do so with a click or two. Plus I can take snapshots of the entire slice which can be used to rebuild the whole VPS through a nifty administrative console. They don’t offer much storage but I plan to use Amazon S3 for storage on the cheap.

Anyway, so far so good.

Next up is moving my 25 web sites to the new server! (Who knew I was so rich in Internet property!)

Anyway, I’ll be posting up my old articles and files over the next couple of weeks but in the meantime here’s a nice picture:

The Flatirons