Skip to content

Debian Router/Gateway in 15 Minutes

A multitude of reasons exist as to why one would want to build a custom router vs. suffer with the performance, reliability issues, and limitations of an off-the-shelf solution. In the spirit of keeping this post short, I won’t launch into a long diatribe on the pros and cons of each here, but I have plenty of thoughts on this, so if you are interested, just ask.

What we are about to do is configure an incredibly fast and stable router/gateway solution for your home/office in about 15 minutes. (Note: This post assumes you already have your machine loaded up with a fresh copy of Debian 5.0 Lenny and you have the two needed NICs installed.

First, let’s make three initial assumptions:

  • eth0 is the public interface (the Cable/DSL modem is attached to this NIC)
  • eth1 is the private interface (your switch is connected to this NIC)
  • All of the client computers, servers, WAPs, etc. are connected to the switch

Read More »

Categories: Linux.

Tags: , , , , ,

Restoring Horizonal iTunes 10 Window Controls

With the introduction of iTunes 10, several new and rather unusual UI changes have arrived as well.  Perhaps the most troublesome, for me personally, have been the vertical window control buttons.  I prefer consistency in all of my applications, so luckily a quick fix is available to restore the standard horizontal buttons.

Simply run the following command in your Terminal:

defaults write full-window -1

Now, just restart your iTunes application and you should be all set. A special thank you goes out to Ars Technica’s Review of iTunes 10 for this information.

Categories: Apple / Mac.

Tags: , , ,

eAccelerator Installation on Debian

Today’s post covers the joys and benefits of opcode caching.  If you have a very active site, this caching method can provide a great deal of relief to your servers by significantly reducing load averages and CPU utilization.

How does it work?
It’s quite simple, actually.  Without caching configured, each time a PHP-based page is requested by a user, the server gathers all of the needed files and “compiles” them into a result which it can understand and deliver.  This result is known as “opcode”.

The technique of opcode caching preserves this generated code into a cache so compilation only needs to happen once and then can be used over and over again for numerous requests by numerous users.

Why eAccelerator?
Several PHP caching choices exist including APC, Zend, and XCache.  I’ve chosen eAccelerator based on numerous reports such as this one which show its distinct performance advantage and also in large part due to the personal recommendation of seasoned server architects such as RackerHacker.

Read More »

Categories: Linux.

Tags: , , ,

VirtualBox on a Headless Debian Server

I’ve got too many computers.  It’s become increasingly difficult to convince people “I’m not *that* nerdy” when I have servers and wires laying around everywhere.  A consolidation project is in order.

For this exercise, our goal is to combine a Linux file server and a Windows workstation elegantly into one machine.  “Windows?!?!” you gasp in horror?  No need to be alarmed; I use Linux/BSD exclusively on servers and Mac OS X on my desktops.  I have only one very specific need for a standalone Windows machine, so let’s leave it at that for now.

The Linux file server is headless and of course doesn’t run X-Windows or any other GUI.  I need to have a full Windows environment available which I can RDP into at any time.  I first experimented with Xen which is a solid enterprise solution but overkill for this project.  Next, I spent a significant amount of time with KVM which is easy to set up but has a bit of quirky management in my opinion.  Finally, I settled upon Oracle VirtualBox; it’s free, fast, and can be elegantly controlled at the command line.

Read More »

Categories: Linux.

Tags: , , , , , ,

Debian Kernels and Tigon TG3 Firmware

If you are updating the kernel on your Debian 5.0 (Lenny) or Debian 6.0 (Squeeze) installation and have a Tigon Gigabit ethernet controller, such as the one on the Dell Poweredge T110, you may receive the following warning messages:

W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3

While harmless, these messages may be a bit disconcerting.  Luckily, an easy, however not widely-documented fix, is present to solve this.  Simply follow the two steps below:

1.) Add the “non-free” repository to the sources.lst file. (Here we are using Debian Squeeze. Replace “squeeze” with “lenny” if you are using Debian 5.0 Stable.)

nano -w /etc/apt/sources.list
deb squeeze main contrib non-free
deb-src squeeze main contrib non-free

2.) Update apt-get and install the “firmware-linux-nonfree” package.

apt-get update
apt-get install firmware-linux-nonfree

Now, you should be all set and you can attempt the kernel installation once more.  According to this Debian bug report, the Tigon TG3 firmware is not listed in the package description even though it is present in the package itself and perhaps why some confusion arose.

Categories: Linux.

Tags: , , , , , ,