Building 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.
My brother had this old IBM Aptiva (which he had found from a trash can nearby his home) which happened to be just a suitable piece of hardware for the purpose:- Pentium 150 Mhz
- 14 Megs of RAM
- 1,6 GB Harddrive
- Disk Drive
- CD-ROM
- 10 Mbps Network Interface Controller
- Soundcard
- Keyboard
- Mouse
- Video Card with 2 MB Memory, integrated to motherboard
- IBM G50 14" Monitor
- Please choose the desired capacity for the created floppy (3 choices)
- Please select the processor type in the destination Coyote Linux system (2 choices)
- Please select the type of Internet connection that your system uses (1. Standard Ethernet Connection, 2. PPP over Ethernet Connection, 3. PPP Dialup Connection, 4. ISDN Connection)
- Does your Internet connection get its IP via DHCP? [y/n]
- Install the Road Runner DEC protocol login software) [y/n]
- Install the Big Pond login software? [y/n]
- Do you want to enable the coyote DHCP server) [y/n]
- Would you like to install sshd for secure remote access? [y/n]
- Would you like to install Webadmin for system admin via a web interface? [y/n]
- Would you like to create another copy of this disk [y/n]?
IP Address: 192.168.0.1
Netmask: 255.255.255.0
Broadcast: 192.168.0.255
Network: 192.168.0.0
These 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
The next thing to do was to build the network. I attached a cable from the modem to the router's Internet network card, and from the router's local network card to the switch. All other computers were directly connected to the switch. The result is shown in the fine picture on the right. After that I booted the new Linux Router with the newly made boot disk. Then I adjusted the network settings accordingly for all the computers connected (c1 - c4).
On Windows: Control Panel -->
Network and Dial-Up Connections
--> Local Area Connection
--> Internet Protocol (TCP/IP):
IP address: 192.168.0.n Subnet mask: 255.255.255.0 Default gateway: 192.168.0.1 DNS servers: ...
... where n of course needs to be a unique number for each machine (IP addresses could be obtained also automatically by enabling Coyote Linux DHCP server for internal network, if needed). On Linux netconf is a good tool for changing network settings. http://www.murdok.org/images/ethernet_lan.png After that I pinged other computers and - being in Finland - Nokia:
[jn@karelia docs]$ ping nokia.com PING nokia.com (147.243.3.73) 56(84) bytes of data. 64 bytes from www.nokia.com (147.243.3.73): icmp_seq=1 ttl=246 time=48.7 ms 64 bytes from www.nokia.com (147.243.3.73): icmp_seq=2 ttl=246 time=98.9 ms 64 bytes from www.nokia.com (147.243.3.73): icmp_seq=3 ttl=246 time=19.8 ms --- nokia.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2014ms rtt min/avg/max/mdev = 19.825/55.839/98.974/32.702 msand 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. Btw, becase the whole file system is just a RAM disk, the machine can be shutdown by just pressing the power switch like in the good(?) old DOS times.. References 1) 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. First appeared at http://koti.mbnet.fi/~keiky/misc/linux/router/lnx_router.html Mr. Nurminen studies Computer Science at the University of Helsinki. Currently he is working as a software designer for a Finnish company developing FimX, a professional tool for managing real estate services (see more: http://www.fimx.net). In his spare time he likes to read and fiddle with his computers and guitars.
No comments yet. Be the first to comment!