[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian as a router.



Apparently, _Cordazer Calvin Broadus_, on 05/05/04 19:10,typed:
Greetings,
   Instead of buying a router I thought that I would
hook up my PC that has two NICs as a router. Basically what I have below is a rough illustration of
what this looks like.  I am trying to sift through the
networking howtos from www.tldp.org but that is slow
going.  Has somone set this up?  Any good
walkthroughs?

[ISP]----[Cable MODEM]-----[My PC eth0]
                           [My PC eth1]----------[My iMac]


I am running:
[ISP]--[ADSL modem]-->[PC-R eth0][PC-R eth0]--Sw--->[PC Win98]
                                                    |
                                                    ---->[PC Sid]
(where Sw = switch, PC-R = router PC running Sarge)

Once you have the two NICs recognized in your router computer, you are ready to do NAT and masquarading.

It is vital that you have a firewall script set up on your router. Iptables is the way to go. There are numerous iptables how-tos on the internet. E.g.:
http://newbiedoc.sourceforge.net/networking/homegateway.html
http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html

And to let the computers on your internal home network use internet connection, you must turn masquarading on in your router, as mentioned in the above pages. (The only problme I see is if you do not have iptables modules compiled in your kernel, in which case you need to compile your kernel with netfilter and IPtables support(Networking options).)

Go through those pages and feel free to ask if you have any questions. Also, main files you will want to be aware about are:
/etc/network/interfaces/
/etc/resolv.conf
/etc/hosts
and your firewall script(s)

GL,
->HS
--
(Remove all underscores,_if any_, from my email address to get the correct one. Apologies for the inconvenience, but this is to reduce spam.)



Reply to: