Making your own home router for $500.00 (or less)
Getting sick of trying various consumer level SOHO routers, I decided to take my abilities to the next level. I wanted to build and configure my own gateway / router box.
There are several steps to accomplish to do this yourself, and hopefully this post will illustrate the steps that I took. The first step is to choose an operating system. Any flavor of linux will follow similar steps below, but personal I knew and trusted Gentoo http://www.gentoo.org/ over the other flavors. If I were really paranoid about security though, I would probably go with a linux distribution like Net BSD or similarly hardened linux distributions.
The second step that I took was to obtain the hardware. Your mileage may vary, but here is what I bought:
- Intel Core 2 Duo E7400 Wolfdale 2.8GHz LGA 775 65W Dual-Core Processor Model BX80571E7400 - Retail
http://www.newegg.com/Product/Product.aspx?Item=N82E16819115206
- LITE-ON Black IDE DVD-ROM Drive Model iHDP118-04 - OEM
http://www.newegg.com/Product/Product.aspx?Item=N82E16827106274
- APEX DM-318 Black Steel MicroATX Slim Case Computer Case ATX12V Flex 275W Power Supply - Retail
http://www.newegg.com/Product/Product.aspx?Item=N82E16811154062
- LINKSYS EG1032 10/ 100/ 1000Mbps PCI Network Adapter - Retail
http://www.newegg.com/Product/Product.aspx?Item=N82E16833124120
- ASUS P5KPL-CM LGA 775 Intel G31 Micro ATX Intel Motherboard - Retail
http://www.newegg.com/Product/Product.aspx?Item=N82E16813131288
- Mushkin Enhanced Blackline 2GB (2 x 1GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500) Dual Channel Kit Desktop Memory Model 996684 - Retail
http://www.newegg.com/Product/Product.aspx?Item=N82E16820226048
- Seagate Barracuda 7200.10 ST380815AS 80GB 7200 RPM SATA 3.0Gb/s 3.5" Internal Hard Drive -Bare Drive
http://www.newegg.com/Product/Product.aspx?Item=N82E16822148231
- D-Link DWA-556 Xtreme N PCI Express Desktop Adapter
http://www.amazon.com/gp/product/B000N4WRFY/ref=ox_ya_oh_product
A few things to note about the hardware. The first is that the wireless card is probably the toughest choice. If you get the wrong card for your linux distribution, you will end up placing a lot of RMA requests. I personally went through 3 different card vendors until I settled on the card that I got.
Another thing to note, is the price. You can cut corners here and there to reduce my cost of $500.00 to something more in line with SOHO routers. This article will entirely be based on the hardware that I have selected above.
The third step is to get all of your reference websites in order. Here are the links that I used as a reference:
- http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1
- http://www.gentoo.org/doc/en/home-router-howto.xml
- http://en.gentoo-wiki.com/wiki/Wireless/Access_point
The fourth step is to download the operating system. I went with x86_64 gentoo live cd.
http://gentoo.chem.wisc.edu/gentoo/releases/amd64/current-iso/
I choose to download the install-amd64-minimal-<date>.iso file Then simply you follow the directions to install Gentoo located in the handbook http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1 When I finished installing Gentoo, I installed the following packages using portage:
- app-admin/sudo
- app-admin/syslog-ng
- app-arch/unzip
- app-editors/vim
- app-misc/screen
- app-portage/eix
- net-analyzer/bmon
- net-analyzer/iptraf
- net-dns/bind-tools
- net-dns/dnsmasq
- net-firewall/iptables
- net-misc/bridge-utils
- net-misc/dhcpcd
- net-misc/ntp
- net-wireless/hostapd
- net-wireless/iw
- net-wireless/wireless-tools
- sys-apps/pciutils
- sys-apps/slocate
- sys-boot/grub
- sys-kernel/gentoo-sources
- sys-process/vixie-cron
- www-client/lynx
I then followed the instructions at http://www.gentoo.org/doc/en/home-router-howto.xml
After those instructions, I went to http://en.gentoo-wiki.com/wiki/Wireless/Access_point After all of the above steps were done, the real fun begins. Configuring the files to do what I want them to do.
I personally set everything up like a bridged connection http://en.gentoo-wiki.com/wiki/Wireless/Access_point.
One more thing to note, is that the wireless card I used (D-Link DWA-556 Xtreme N PCI Express Desktop Adapter) works with the latest kernel (2.6.30-gentoo-r5 at the time of this writing). You will need to use hostapd to run it in "master" mode (that is the ability to run as a wireless access point instead of just another wireless node). The driver that you want to use in hostapd is 'driver=nl80211'. Also, the driver that you want to use for the wireless is AR5418. Currently you can only run in 802.11g mode (not n, even though the card supports it). That means you have an upgrade path, once n is supported you don't need to replace the card.
I would love to hear from other people who DIY with home routing. Please leave a comment with packages that you use on your system, or good utilities that you run to keep your home network going.
Permalink












