Urgent: IP masquerading in Debian 3.0
Do I need to re-compile the kernel?
Or, the kernel is already support the IP masquerading? |
apt-get install ipmasq did the trick for me.
|
iptables or ipchains?
I prefer to use iptables. I've found it to be much easier to use and more flexible than ipchains. It's quite easy to set up..
Download a 2.4 kernel and compile it. Here are the relevant options using 2.4.21 from .config. I've put them in a link because they are too long to include here. After you recompile (don't forget to include all your other options!), use these two commands: echo 1 > /proc/sys/net/ipv4/ip_forward /sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE Where eth1 is your EXTERNAL interface. You may need to look at your routing tables (route -n) to make it work correctly. Note that this is a WIDE OPEN configuration and provides NO security. Beware! See the IP tables howto for information on a more secure setup. Hope that helps... |
All times are GMT -5. The time now is 11:41 PM. |