Building a Linux Router

A Cisco Systems ASM/2-32EM router in the Micro...
Image via Wikipedia

So you have decided to use linux as a router. There are a variety of reasons to use linux as a router and there are several varieties of linux to choose from. For the purpose of this guide we will use pfSense because its not only one of the most widely used distributions, but is also one of the easiest to install for a novice. The first decision you will need to make is what kind of hardware you intend to install it on. While it does run on PPC hardware and some embedded hardware, most people choose to simply run it on x86 hardware.

Being that the operating system is not very hardware intensive, you can use hardware as old as a Pentium II or AMD K6-2. The documentation specifies that you will need at least 128 MB of ram though. If you plan on keeping it in a room you may occupy consider using a passive heat sink to keep noise down. Other components you will need include the basics, like some kind of optical drive to boot the Live CD from. If you are building this PC from new or old parts consider the form factor for your case carefully. A smaller form factor case means it will take up less space and become easier to mount or tuck out of the way.

Of the next important parts in building your router is selecting a couple of NICs (Network Interface Cards). Check to see if you have an on board NIC, if you do you will only need one additional one. Its ideal to get a decent quality card, that will last a long time and will have a high compatibility with your linux distribution. You will need a monitor and keyboard hooked up for initial setup but after that the system will be fully managed via the web interface.

Enhanced by Zemanta

Installing a Linux Router Operating System

Screenshot of ReactOS 0.3.4
Image via Wikipedia

Once you understand the basics and have selected your hardware you can now start installing your operating system. While there are many linux operating systems made for firewalls or routers, for the sake of this article we will use pfSense one of the most common and well supported ones out there. First you will need to go the website and find the latest version of the operating system. From there you can download it and after that you will usually need to unrar it into its default iso format. Once in iso format you can use a CD burning utility and burn it to a CD.

Once you have your CD burned, you can prepare your computer by entering the BIOS and setting the first boot device as the optical drive. Once you do this, insert the CD, and reboot the computer. It should start booting into the linux kernel. You wont actually need to do anything until the operating system greets you with a prompt and a series of list items. The only thing you will need to do at this point is to assign which network card is your WAN card and which is your LAN card. You can now plug the LAN cable into your PC or switch and the WAN cable into your internet connection.

With the cables plugged in, open a web browser on a PC that is connected to the LAN side of the router. You can navigate to the linux router by going to the routers homepage. Once there you can use the default login to access the settings page. If your internet connection uses DHCP the computers on your network should be online. You can now setup port forwarding and install additional packages. You should remember to change your default password under the administration link.

Enhanced by Zemanta