My first position out of university was working as a firewall engineer for a large credit card processing company. It’s where I learned the way of the packet and how to build a proper firewall ruleset. This article will show you how to build a firewall using Linux and Iptables that has the elegance and effectiveness of a…

[ UPDATED: JANURAY 2016 — I have since abandoned CentOS and moved back to Ubuntu. CentOS caused massive issues when rebuilding my site that required me to reinstall with Ubuntu. All the issues immediately went away (RSS, WP Permissions, Caching, etc.). I recommend if you’re doing a LEMP stack you stay with Ubuntu as of 2016. ] After…

Over at Hacker News there are often threads about less-traveled UNIX and Linux commands. One particular comment collected a few of the posts, and I decided to parse all of those threads’ commands, plus my own favorite list of obscure entries, and put them in one place. Somewhat obscure UNIX commands column: create columns from text input tr:…

If you enjoy the command line then you don’t need to be sold on efficiency or purity of action. But even those who grok CLI are unaware of a number of ways to be more elegant accomplishing their tasks. Here are a few of my favorites. Remap Your CAPSLOCK Key Use ctrl-r For History Autocomplete Switch to iTerm…

My friend Jason just posted a really cool command line trick that lets you log stderr and stdout to different files while still having them visible in the console. ($command | tee /logs/stdout.txt) 3>&1 1>&2 2>&3 | tee /logs/stderr.txt Very cool.

It irks me when names are mispronounced—especially when it’s easy to figure out the right way to say it. Some examples include “line-ix”, “oh-es-ex”, or “you-bun-too”. The mispronunciation of Ubuntu is becoming more common now. As it gets more popular more are getting the opportunity to mangle it. When I first saw the name I proceeded to mess…

The following is a chart of the top ten operating systems used to view my site in 2006. As you can see, Linux and OS X are doing well, but not as nearly as well as Firefox is doing against Internet Explorer.

I know you don’t believe me, as we’ve had this conversation before. But there will come a time in your life when you will grow tired of fixing your tools. This will likely lead you to Windows or OS X — both of which, if you avoid tweaking, offer much more stability through updates and patches than Linux…

I’m a bit obsessed with mastering vim. I kind of feel like I’m killing kittens every time I do something inefficiently. I know plenty of commands, but you don’t truly know a command (like in the Biblical sense) until you find yourself using it without thinking. I am on a continuous mission to raise the number of commands…

There is a lot of debate about the pronunciation of Linux. This post will close the issue for anyone who reads it. Here’s the summary: If the undisputed creator of a given thing clearly communicates how to pronounce his creation, that pronunciation becomes the most correct one. This is especially true if that same creator explicitly states that…

Have you ever been in Linux and wanted to watch how much bandwidth was going in and out of your box? Most have, and here’s a very simply way to do it without a GUI or installing anything extra: # watch -n1 “ifconfig eth0 | grep Mb” RX bytes:105209490 (100.3 Mb) TX bytes:448524558 (427.7 Mb) What you end…

There is a bit of a debate in some circles about using xargs vs. the -exec {} option that’s built into find itself. To me, however, it’s not much of a debate; -exec isn’t nearly as good as xargs for what I use find for. I tend to use it to perform tasks involving many files. “Move all…

One of the most important concepts in computer security is “knowing thy system”. This essentially means that in order to be able to protect something you need to have some idea of what it’s doing and/or how it works. Your computer’s connections to the outside world is among the most important information you can have about your system.…

So I’m getting a little freaked out lately. I keep hearing that both the Gentoo and Debian projects are in trouble. I haven’t researched how much truth there is to these claims, but I’m getting bothered that I keep hearing the same thing over and over. What would I do if these projects were to die off or…

I’ve been playing with Linux since 1999 and using it steadily in one capacity or another since 2001. I’ve tinkered with just about every major distribution out there and have come to some overall conclusions that I thought I’d share. Gentoo Gentoo has been my distribution of choice since 2002. My buddy Ken and I giddily installed it…

Ever wonder what mail servers people run? I found myself wondering what the top universities used, so I wrote a lame little script to go and query the top 50 schools from this list, find out their mail servers, and then netcat to them to see what they respond with. The results were interesting. I was specifically wondering…

If you’re ever trying to get dhcp to work in Linux, and the package you installed also installed a service file named dhcp at /etc/init.d/dhcp, ignore it. You start the service not by invoking that script (which will apparently fail every time); you do so by running /usr/bin/dhcpd. Why? I don’t have any earthly idea. Anyway, I hope…

Someone pointed out this Gentoo flame article the other day and I just got around to finally reading it. Well, it was lame. Not because the guy likes Slackware better than Gentoo, but because of the reasons he gave. His major gripe seemed to be that it was difficult to get KDE running in Gentoo. I say bovine…

I was having some issues involving losing connectivity to a system of mine due to a dynamic IP. Normally one would just use a dynamic DNS service to solve the problem, but in this case there were complications that kept that from being a solution. So that’s where Python comes in. I threw this “solution” (It’s in quotes…