How to turn an old PC into a router

If you’re looking for a project for this holiday, how about converting a redundant PC into a feature-packed router? Blogger CompTutor explains how.

hp elitebook 700 series g2
Credit: Gordon Mah Ung

Regular readers of the Disruptor blog will know that I’m a big fan of self-build projects. I’ve written about getting started on a solar power kit and getting into drones for cheap. Well, if you liked those, here’s another one that I think you might enjoy.

The project is simply one of turning a redundant computer into a powerful router and firewall. In other words, junking the puny, lame router that you may be using and taking control of your network with a UI- and feature-resplendent workhorse.

The advantage of taking control of your own router and firewall destiny is that you don’t have to deal with potential built-in router security vulnerabilities from a manufacturer—it’ll be all your responsibility.

The self-build is something that jumped out at me for its sheer appropriateness for us geeks, when I stumbled upon a bunch of people talking about it in the blog CompTutor’s How To comments on Reddit.

Parts

CompTutor reckons the way to approach the job is with free pfSense software, an open-source distribution of FreeBSD.

To do it, he explains that you need two Ethernet ports in the computer—one for the modem as input and one for a switch as output.

So, in addition to the PC, you’ll need at least one additional network card and some kind of Ethernet switch. The switch will replicate the ports that you get on a common router.

CompTutor has some specific hardware recommendations on his blog, which you should check out. For example, he recommends fast PCI-E cards, if your computer can handle them.

Software

One of the advantages of pfSense over some other firewalls is that its web interface includes all of the configuration for any components—it doesn’t require any UNIX command-line usage.

I haven’t tried any of this yet, but according to the pfSense website, users familiar with commercial firewalls should pick up the interface quickly. However, there can be a “learning curve” for users not familiar with “commercial-grade firewalls,” the website says.

Hardware

CompTutor’s hardware setup runs along the lines of: Cable modem to pfSense router and firewall combo, to a 16-port Gigabit switch, to an access point, and finally to computers.

He uses an Engenious access point and a Netgear unmanaged switch. There are more details at his blog.

In the comments, Reddit users have pitched in on alternative gear that works. User Superfake123 employs an EdgeRouter Lite, from Ubiquiti Networks. Cr0ft says get power-frugal hardware rather than an older eco-unfriendly PC.

Another user discounts the entire Spare-PC-as-Router thing altogether in the comments, though. He has another idea, and plans to turn his old PC into a makeshift arcade with tube TV. He just needs some wood, he says.

The switch

I’ve just started successfully using an aging Netgear router as an unmanaged switch for my Time Warner ISP-supplied ARRIS-brand router, so conceivably, in this Spare-PC-as-Router scenario, you could use the router that you were replacing as the switch. I haven’t tried it yet, though.

To use as a router as a switch, you’ll need to re-assign the IP address, disable the firewall on the router, and turn off "DHCP" and the "DNS Server." I also turned off the Wi-Fi radios—I think we’ve got enough 2.4 GHz whizzing around causing interference. I also performed a full reset.

Then use a LAN port to connect to the router, not the port labeled WAN.

So, if you’re done watching your neighborhood’s holiday-gifted drones crashing in the local park, amusing as it may be, it could be time to head indoors and try your hand at this, your next project. Wood isn’t required.

This article is published as part of the IDG Contributor Network. Want to Join?

To comment on this article and other Network World content, visit our Facebook page or our Twitter stream.
Must read: Hidden Cause of Slow Internet and how to fix it
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.