Building A Linux Routerby Janne Nurminen Updated: 05. Nov 2003 / On since: 01. Jun 2003
News, updates..
[05. Nov 2003]:
I found an article about building a Linux router in Polish.
The article in question seems to be, more or less, based on what is said here.
>> PhpNuke Polish:
Jak zbudować linuksowy router.
AbstractBuilding a reliable, full-featured broadband router can be very easy and cost-efficient. This article is about building one for routing a LAN to the Internet with NAT (Network Address Translation -- Linux users also call it as IP Masquerading) using an old computer and a Linux micro-distribution designed to have very low hardware requirements. We'll end up having a very simple and stable system, yet featuring e.g. iptables based stateful firewalling and remote administration.Hardware
Choosing a suitable Linux DistributionThe basic idea was to build a router which would also provide firewall services to protect the internal network, and which could be administrated remotely. After doing a quick search, I found Coyote Linux which turned out to be just the perfect solution. Basically, Coyote Linux is a single floppy distribution of Linux that is designed for the sole purpose of sharing an Internet connection. Being a single floppy distribution, it runs off of a single floppy disk and loads itself to RAM. The floppy itself can be created using either a Microsoft Windows wizard (!), or by using a set of Linux shell scripts. I created mine using the latter method. Since the floppy was all that was needed, I decided to remove all unnecessary parts from the computer. This makes the machine a bit more silent and less heat-productive. I removed the hardrive, cd-rom and souncard, and replaced the old 10 Mbps NIC with two 100 Mbps NICs (the old one did have a Realtek chip on it, so it would've been supported, too). Luckily it had just the two needed PCI slots for the two network cards. Creating a bootable floppy diskThe next thing to do was to create the boot diskette. I downloaded the Coyote Linux Floppy Creator Scripts (v1.32) and ran them on my laptop which runs Linux (yes, indeed do note that to run scripts on Linux you need a functioning Linux system ;-). The process itself is very straigh-forward. But before you go, you need to know what modules need to be loaded in order to use your network cards. I used two identical D-Link cards which use the rtl8139 module. To find out which module you need, CoyoteLinux has provided a very good documentation, available in PDF format. Generally, more information can be found from the Linux Ethernet-Howto and Vendor/Manufacturer/Model Specific Information. The script asks to make some trivial choices:
By default Coyote uses the following settings for the local network interface: IP Address: 192.168.0.1 Netmask: 255.255.255.0 Broadcast: 192.168.0.255 Network: 192.168.0.0These don't need to be changed (unless you need a whole lot of internal IPs, or want to to change the router's internal ip address). Building the network
After that I pinged other computers and - being in Finland - Nokia:
and hua! It worked! Next I unplugged the monitor and keyboard from the router and placed it in its final place.(1 Conclusion
Building a broadband router can be very easy and cost-efficient, and Coyote Linux Router
is a very easy solution for the purpose.
References1) Next time when booting the router it hung up because of a keyboard failure (of course I had to remove the router from its Final Place to be able to plug the monitor back and see what was going on). That was resolved by changing the proper BIOS setting.
http://koti.mbnet.fi/~keiky/misc/linux/
|