|
Linux Router Project (LRP): This project is based on Linux 2.2 kernel. Newer network cards typically do not supply Linux 2.2 kernel drivers, this project is on a "legacy track". This tutorial demonstrates the detailed steps on how to build a low-cost, extremely reliable, high-performance, industrial-strength, firewall and network address translator for protecting and/or sharing PCs behind a cable modem or DSL modem in residential, commercial or industrial settings. This LRP firewall can handle multiple-client pass-through of Microsoft PPTP-VPN and it has secure and encrypted remote administration capability when used in the optional hard-disk or Compact Flash or IDE-ZIP disk mode. How to transform an old 486 PC to a professional print server,
see this page.
A miror of this LRP Site is hosted in Bucharest,
Romania A mirror of this LRP Site
is hosted in Curitiba, Brazil (in Brazilian Portuguese) Scope and purpose of this tutorial: Previous experience with Linux or Unix is not needed. |
|
The software used to build this firewall is free, under various Open Source licenses,
it only costs you time to assemble them together. If you collect all the necessary information and hardware, you can do this project in one or two evenings. A cookbook-recipe approach is chosen so that you can build a robust Linux firewall / share-box by following the step-by-step procedures; you don't need to know the cryptic Unix or Linux commands, although in the process of building the box, you may learn a few commands. |
|
|
Hardware: A surplus 486-66MHz PC or
a low-end
Pentium PC. For extremely demanding applications, try a 500 MHz Celeron/Pentium with two Intel PRO/1000 MT Gigabit Ethernet cards. |
|
|
|
Two (2) Ethernet network adapter cards: note Click here to see a full list of Ethernet network cards supported by this project. Caveat: Do not combine an ISA NE2000 and a PCI NE2000
on the same motherboard. The software drivers get very confused. Samples of network cards supported by this project: ISA - 3COM 3c503, 3c507, 3c509,
3c515 Confused, or in a rush to get started, here
are some suggestions. If you must buy new PCI network cards for the project, consider these moderately priced cards: Realtek 8139 chipset (use rtl8139 driver), D-Link DFE530-TX (use via-rhine driver), Novell 2000 compatible Realtek 8029-based PCI card (use ne2k-pci driver), Netgear FA311 or FA312 (use natsemi driver), US Robotics USR7900 (use tulip driver), Sohoware SFA110 (use tulip driver). If you must buy new PCI network cards and you have lots of
money, consider these top-tier Ethernet cards: 3COM 3c905 (use
3c59x driver), Intel Pro/100
series (use eepro100 driver), Intel PRO/1000 MT (use e1000
driver), or generic cards based on the DEC/Intel 21*4* chipset
(use tulip driver). Caveat: These fast 10/100 Mbps full-duplex
cards may be too fast to talk to some models of cable modems with only
a half-duplex 10 Mbps Ethernet design. Terayon cable modem is one of
those older designs |
|
Preparation: |
|
Identify |
Identify the MAC address: PCI
network cards: There is no need to setup PCI cards. ISA
network cards setup: 3c503: 3c509: 3c515: NE2000-ISA clones, Realtek 8019 chip: (Novell
2000 clone) D-Link DE-220, Allied Telesyn AT2000, Kingston
KNE2000 Intel EtherExpress 16 Intel EtherExpress Pro/10 and Pro/10+ (i82595TX and
i82595FX) SMC 8416 EtherEZ SMC 8003/8013 EtherCard Plus family cards, use on-card
jumpers to set: Notes: |
Creating a boot floppy for LRP, step by step
procedure
|
(1) Install winzip and
winimage on your PC. (2) Download and save this base image. (3a) Download and save the appropriate network
card driver package (3b) (3c) Invoke winimage, drag and drop the base image (from step 2) in it. You should see something like this. Drag and drop the appropriate modules.lrp, (step 3a) etc.lrp (step 3b) and syslinux.cfg (step 3b) into the winimage window. Winimage should now contain 12 files and it should look something like this. Save your newly assembled image [at the winimage window, click File... Save]. (4) Insert a new, high-quality, blank floppy disk in
drive A, click Disk...Write to create a LRP boot-floppy. (5a) (5b) (5c) (5d) (6) Before unplugging your existing Windows computer that is connected to the cable modem or ADSL modem, it is advisable to release the IP address first. Click here on how to release the IP address. Power up the firewall with the LRP boot-floppy in drive A. The first-time and second-time boot up may take 5 minutes (apparently stuck on syslogd) due to the lack of proper IP address. login in as root
then type q to drop to the # prompt. (7) It may be advisable to power-down/power-up your cable/DSL modem to purge its memory of existing Ethernet card's MAC address. Sometimes you may have to release the IP address to your ISP before powering up the LRP. Power off your LRP firewall. (8) Connect eth0 to the cable modem/DSL, connect eth1 your internal network hub (see this diagram). Power up the cable modem/DSL modem until it becomes stable then power up the LRP firewall. (9) The majority of residential ADSL and cable-modems use "dynamic IP", in that case, proceed to step (10). If for whatever reasons, you have "static IP address", jump to this page. (10) If you use dynamic IP, you may
have to jump through some bizarre hoops to keep your DSL or
cable modem company happy. Here is how to jump
hoops. (11) Configure
DHCP (on the LRP) for your location: (12) Reboot the LRP firewall. (13) To configure other PCs in your internal
network, see this page. (14) Surf happily ever
after. If you have trouble
getting LRP to work, see this
trouble-shooting guide.
(15) You may want to disable the power-save feature of the BIOS so that the CPU does not go into low-power mode (which degrades the performance of the LRP) when there is no traffic going through the firewall. Thanks to Paul Sorichetti of Ottawa, Ontario, Canada for discovering this point. (16) Optional, Advanced: If you have static IP address or quasi-static IP address AND your "ADSL or Cable Modem User Policy" allows you to run a web server, e-mail server, NetMeeting or pcAnywhere server from your inside network, see this page on "port forwarding".
(17) Optional, Advanced: If you want to build a LRP firewall that boots from IDE hard disk or Compact Flash or IDE-ZIP drive, see this page. (18) Optional Advanced: If you want to telnet to your LRP firewall, see this page. (19) Optional Advanced: If you want your LRP to use local time zone or use SNTP to synchronize to time servers, see this page. (20) Optional: You may want to remove the hard disk to reduce power consumption and reduce noise. |
|
References: Technical synopsis: MSN Messenger
Others: |
© 2000-2007 Nicholas Fong, e-mail
![]()
![]()
Burnaby,
B.C. Canada ![]()
Revised: June 14, 2007