linux server as a router
Hey everyone, I have Debian sarge installed on a system as a server with no GUI. I have already configured shorewall and dhcp and both are working for me, what I want to do now is make the server function as a router so i can replace my current router. Does anyone know what i need to do or know of a goog guide for making it a router? any help is appreciated.
|
Does the machine already have two nics installed and if so how are they configured.
I have never used shorewall but I would think it would have the ability to setup that portion for you. Might read the manual docs and faqs. I am only familair with using a script that can be gerneated from this site by answering the questions. http://easyfwgen.morizot.net/gen/ If you go this route then shorewall is not needed. Brian |
yes, there are two nics installed, eth0 is set for dhcp since I am on a cable connection and need dhcp for the router. eth1 is set to static as it is the internal nic for my network. I would like to use shorewall because I have learned how to configure the rules and policies but I will have to do some searching of its man pages to see if it actually sets up routing as well or not.
|
if the machine already has 2 nic`s , i presume that you want to use the it for NAT(network address translation) masquerade
the command is : iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE |
shorewall has a masquerading file that is supposed to setup nat which is what i want to use it for. does this work or do i still need to run that command? also i have found a setting that it says that I need to set in the /etc/sysctl.conf file to say net.ipv4.ip_foward=1 is this true? and if so do i type it as above or do i type it as net/ipv4/ip_foward=1? I can get a dhcp address from the server i just cant get to the internet
|
All times are GMT -5. The time now is 10:55 AM. |