Click to See Complete Forum and Search --> : Second NIC, using linux as firewall


NVETHIS
01-06-2003, 10:23 AM
Ok, my home network config is as follows. I have Broadband internet, and that comes into the cable modem, then I have the cable modem connected to a linksys Cable/DSL Router with DHCP turned off, and finially I have my PC's connected to the linksys.

I only use the linksys for it's routing purposes because I connect multiple PC's to it.

What I want to do is add a second NIC card to my Linux box. My linux box already runs a DHCP server and is a DNS server. Now I want it to act as a firewall too, so I can connect the second NIC to my CIsco 2912 XL switch and connect the rest of my PC's to that.

Can someone give me some tips on this. I'd really appreciate it. Would I have to change a lot of my settings for the DNS and DHCP? How would the second nic act in this situation? Thanks.

-Bryan

ph34r
01-06-2003, 10:41 AM
Setup the second nic with a static address (10.0.0.1). Plug it in to the switch with the other computers, and set their addresses to use 10.0.0.1 as their default gateway.

For DNS, setup a caching only server on the linux box, and again point the other computers to the 10.0.0.1 address for DNS.

Then you will need a firewall for forwarding/masquing. I use gShield (http://muse.linuxmafia.org) - works great.

rioguia
01-06-2003, 02:32 PM
a good source to download a good testing script is
http://www.e-infomax.com/ipmasq/howto/examples/rc.firewall-2.4-stronger

making sure that your system has all the requirements for a firewall was a major issue for me. i struggled a lot thinking that my firewall scripts were bad when in fact my system was the problem. this script requires almost no editing (read the comments they will explain any necessary edits for your purposes) and will run correctly if your system is configured properly and will greatly simplify troubleshooting for your firewall.
1. copy it into your /etc/rc.d file;
2. cd /etc/rc.d
3. chmod 755 firewall-2.4-stronger
4. ./firewall-2.4-stronger (to execute)

for an overall "how-to"
http://www.e-infomax.com/ipmasq/