setup linux firewall/router
hey guys i am a complete newb to debian woody...currently atm i have a linksys router connecting two computers to the internet with a cable modem...
i would like to take a third computer and create a router/firewall out of it and get rid of the linksys one. how would i go about setting up my debian box as a router/firewall? thank you |
Insecure Router Setup
A. Setup network interface (the internal one) Code:
ifconfig eth1 192.168.0.1 netmask 255.255.255.0 bcast 192.168.0.255 B. Turn on forwarding Code:
#echo 1 > /proc/sys/net/ipv4/ip_forwarding C. Share the Internet connection Code:
#iptables -A POSTROUTING -t nat -s 192.168.0.1/24 -j MASQUERADE Code:
#iptables -A POSTROUTING -t nat -s 192.168.0.1/24 -j SNAT -to <ip address here> D. Setup host Give the computer connected to the router (or linksys switch if u set it up that way) an ip of 192.168.0.X (X = any number from 3 - 254) E. Plug it all together (for computer-to-computer connections make sure you use cross-over cables as well as for the uplink-to-computer if you use the linksys router as a switch). this setup will allow you to share your connection through a linux computer. it is insecure. you should check a tutorial on iptables for added security (DO THAT NOW). |
i have to re-state, SECURE YOUR SYSTEM BEFORE PUTTING IT ON THE INTERNET.
|
Ya know, a noob might be better trying ipcop, on a 486 with two NICs,
http://ipcop.org or at http://distrowatch.com there are about 8 firewall/router distros. (all CD ISO's. Then, there are a pile of floppy distros (tom's Root 'n Boot), and a floppy firewall that is strong is Bering... These are easily researched in http://google.com/linux with a search word like 'floppy' and, 'firewall', and, 'floppy firewall'... you get the drift? |
Thanks a bunch
|
All times are GMT -5. The time now is 09:12 AM. |