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 (see the 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.

Comments Comments (15) Permalink Permalink     Rss feed for comments Post Comment Feed

E-mail DotNetKicks Digg StumbleUpon Slashdot Twitter Facebook Del.icio.us

Comments (15) -

Nice post! For my router, I am using pretty old computer: IBM Pentium 2@450Mhz, 128MB RAM, CD/DVD, network card.
I prefer Slackware distribution of linux, and on my  router, I installed Slackware version 9.1 with latest kernel. Ant it is working good, never hacked, but off course I setup iptables for firewall.
You don't need powerful computer for routing, old one will finish job, because routing doesn't require much resources.

Another option is to buy router devices, Dlink have some cheap offers, but I prefer computer as router, because I have more freedom to setup it the way I want.

United States 3/5/2010 10:43:55 AM #
I agree 100%. The flexibility of your own PC for routing is just nice.
United States 3/5/2010 2:03:26 PM #
Fede
Fede
That's a lot of hardware for a home router. NAT for 3 or 4 computers (or ten) doesn't take much CPU, and compiling can be done using distcc. I have an old Celeron 1.7GHz using Gentoo as my home router, with 256 RAM. Now, I agree it would be very useful to have another 256 of RAM, but for the other part, I use distcc for compiling over my desktop which is a quad core with 4GB of RAM (so, no problems there). My home router is also a gateway, NFS share, mail server (postfix+dovecot+clamav+spamassasin+mysql... this is what takes the more RAM), Web server (Apache of course), FTP, IRC, and more and it gets all the work done just fine. If you can find yoursefl an old PC, with a decent CPU and 1GB of RAM, you can use that hardware as a desktop PC and replace it with the old one without problems unless you have a huge database or something that requires CPU power. My two cents.
Argentina 4/22/2010 2:32:27 PM #
You are very correct. Routing (iptables and managing the two nics) are not resource intensive. I ended up spending way too much money on the hardware for certain.

I think though with the above barebones configuration you could easily get hardware costs down to the $199.00 range and easily compete with SOHO routers.
4/22/2010 10:34:39 PM #
Fede
Fede
Sorry about the multi threads, but the page kept throwing me errors and I thought they weren't post
Argentina 4/22/2010 2:33:38 PM #
Yeah, sorry about that. I am not sure what is going on with the commenting system to cause it to throw the error message.
United States 4/22/2010 10:29:05 PM #
Commenting on the blog is fixed now. I had something mis configured.
United States 4/25/2010 3:55:00 PM #
Simba7
Simba7
Just wanted to comment about setting up a home router.

I actually have 2, a primary and a secondary. The specs for the primary are:

Asus CUR-DLS with 2x Pentium III @ 1GHz
512MB PC133 ECC RAM
18GB Fujitsu U160 HDD
Intel Pro/100+ 10/100mbps Onboard Adapter
SMC 8432BTA 10mbps RJ45/AUI/BNC PCI Adapter
2x Digital DE504 Quad 10/100mbps PCI Adapter
Compaq NC3131 Dual 10/100mbps PCI-X (in a PCI slot) Adapter
Intel Pro/1000MT Dual 10/100/1000mbps PCI-X Adapter
IBM Gigabit Ethernet-SX 10/100mbps PCI-X Adapter
Allied Telesyn AT-2560FX 10/100mbps PCI Adapter

..and the secondary:
Compaq Deskpro 4000 w/Pentium MMX @ 200MHz
128MB EDO RAM
Quantum 4GB IDE HDD
ThunderLAN 10mbps Onboard Adapter
3x Compaq NC3131 Dual 10/100mbps PCI-X (in a PCI slot) Adapter
Plain 10mbps RJ45/BNC ISA Adapter

Both running Gentoo Linux without issues. I've tested both systems and the Compaq holds its ground on a 15mbps connection. The primary is probably overkill, but oh well. It also handles 4x VPN connections from remote servers.
United States 5/22/2010 9:37:16 PM #
That is a lot of network adapters. How tough was it to setup VPN using Gentoo? I was considering doing the same.
United States 5/23/2010 1:42:21 AM #
I have been meaning to give something like a try for some time. I have an old pc lying around with Debian installed. Do you know if the process will be the same as using Gentoo? I guess I could try Gentoo it's just my only Linux experience is with Debian and Ubuntu. Hmm comfort zones and all that!
United States 7/31/2010 3:11:29 PM #
You should be able to do the same with Ubuntu. All of the applications that provide routing services are the same across distributions. I am just more used to Gentoo.
United States 8/1/2010 12:50:33 PM #
Hmm is it really worth it making your own router? I personally hate them ever since i had to get one in the house because there are numerous laptops and they all need internet. I had a lot of problems with my router, almost though it how to fly Smile), from the 8th floor.
Norway 8/17/2010 7:18:33 AM #
Só podia ser o Gentoo...
Brazil 8/24/2010 2:43:42 PM #
do you notice any difference between this and a store bought router? I don't want to spend 500 on a router but i do have an old linux box lying around.
United States 8/30/2010 12:37:12 AM #
Yeah, the uptime of the router is pretty much as long as I leave it running. In other words, it never locks up just by using it. A lot of store bought routers that I have tested have locked up just by simple usage.

Also, I can configure a lot of settings on it.

If you just have a box lying around, it would be beneficial to go down this route in my opinion.
United States 8/30/2010 10:25:58 AM #

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


About Author

Justin Wendlandt
Justin Wendlandt
I work for Wells Fargo, play a lot of video games, and program in many languages. [ more ] E-mail me Send mail

View Justin Wendlandt's profile on LinkedIn View Justin Wendlandt's Facebook Profile View Justin Wendlandt's Twitter Profile View Justin Wendlandt's Zune Profile View Justin Wendlandt's Xbox Live Profile

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Recent Posts

Recent Comments

Comment RSS

Most comments

ericchapman ericchapman
1 comments
gb United Kingdom
Clone High Streaming Clone High Streaming
1 comments
us United States
iphone mad iphone mad
1 comments
gb United Kingdom

Poll

This poll is closed.
What do you use to connect to the internet?
A DLink Exterme Gaming router
 
0.0%
A Linksys / Cisco home router
 
0.0%
None of the above
 
0.0%
A Netgear home router
 
0.0%
I built my own box to do routing
 
100.0%

Total Votes: 1

Stock Quotes

WFC 25.10 +0.44 (+1.78%)
GOOG 463.18 +2.845 (+0.62%)
BBY 33.46 +0.80 (+2.45%)
CML 17.80 +2.79 (+18.59%)
COST 58.59 +0.80 (+1.38%)
MSFT 23.94 +0.04 (+0.17%)

Digsby

Xbox Gamer Card

Jwendl Gamer Score: 11570
Jwendl
Rock Band 2 (310) TMNT 1989 Arcade (35) Assassin's Creed II (340) Marvel Ult. Alliance 2 (390) FINAL FANTASY XIII (245) Borderlands (1340) Kane and Lynch:DeadMen (40) Madden NFL 10 (0) Family Game Night (0) STREET FIGHTER IV (180) South Park (180) Gears of War 2 (400) TEKKEN 6 (0) Culdcept SAGA (95) CSI: Deadly Intent (0) CSI-Hard Evidence (0)
Offline
8/30/2010 1:31:44 AM
Last seen 08/30/10 playing Xbox.com

Xbox Avatar

xbox Avatar

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Creative Commons License