Design notes for a home firewall/fileserver

Design notes for a home firewall/fileserver

Goals

The end result looks remarkably similar to a standard Intel-based PC. In fact, you can achieve almost all of these goals with a standard PC. My goals for low-power operation drove me to a configuration that is a bit off the beaten path.

The machine I built runs OpenBSD, largely due to the strong security orientation of the developers.

If you have a subset of these goals, there are better alternatives to the PC architecture. For example, if you don't need a fileserver or mail server, a very low-power system can be configured with any of the popular low-cost routers running user-supported software packages such as OpenWRT.

But if you want to serve files, there are few alternatives to the standard PC platform. There are fileservers which run webservers (such as the ReadyNAS), but such machines are not usually configured as firewalls. At one time, the Cobalt Qube was almost an ideal system, but that machine has limited disk-storage options.

In the end, I built a machine customized for my needs. Here is a rough list of the ingredients, assembled in Spring of 2004:

Raw Materials

Please note that this system is far more powerful than necessary for simple webserving, NAT, DHCP, and fileserver activity. At one point, I had used a Pentium-based machine running at 60 MHz to do just these activities. But systems with such limited CPU capabilities are not usually available in a standard PC format nowadays.

Once I set up this system, and after a fair amount of software installation and customization, it acts as follows:

Unless the system is actively serving files to another computer in the house, it is totally silent and consumes minimal power. The drives do spin up when files are needed, but in practice that happens infrequently. Users typically have their home directories on laptops, not on the fileserver. Mail is stored on the fileserver, but user mailboxes are kept on a CompactFlash drive.

Since CompactFlash media is subject to failure, the fileserver regularly makes multiple cascading backups.

Preparation and Assembly

Here is a rough guide to the installation of this system: After you've done all of these steps, you have an OpenBSD system which will boot from CompactFlash and all volatile files (such as system logs) are stored in RAM disk.

This is a good starting point, and if you don't need to run a fileserver, you can stop here (after tweaking the networking parameters so that NAT, DHCP, etc are running).

To attach the hard drives, shutdown the system. Connect the drives as the primary and secondary drives on the second IDE connector. It is crucial that the CompactFlash drive does *not* change its position as the primary drive on the first IDE connector: if you move it, your system will no longer boot from that drive and you will have to start over.

Formatting, configuring, and mounting the hard drives aren't particularly challenging and the necessary steps are covered in the OpenBSD documentation. You will want to run SMB and/or NFS so that your home machines can access the fileserver.

Customizations

Here are some customizations that you may desire:

Alternatives

The following principles guided me to these choices: There are other ways to do this. For example, I could have used an old laptop (generally low power, and built-in battery backup). But laptops, especially the older models, typically don't have much disk capacity. Older BIOS systems may not be able to boot from USB flash drives. Such systems typically have limited memory: a K2 laptop from 1999 might have only 256MB of RAM.

$Header: /home/cvs/htdocs/stan/homesys.html,v 1.2 2007/06/13 18:21:16 chesnutt Exp $