setup debian as a router
hi
I'd like to setup my Debian Lenny as a router. Should I add in /etc/sysctl.conf Code:
net.ipv4.ip_forward = 1 Code:
net.ipv4.conf.default.forwarding=1 my kernel: Code:
# uname -a |
|
I believe the former rather than the latter is what you want
|
Hi,
It is not enough if you want to access to internet and not loacl area! If you use it as gateway to well known network, I mean you declare the gateway in both directions for subnet1 and subnet2. So the sent paquet can come back. Otherwise, if you can't control the subnet2, if there is not gateway declared there, you need to use MASQUERADE. here is a command to send all paquets to eth1 ( eth1 is supposed the the out card to the internet or subnet2 ) iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE Hope this can help best regards bela |
All times are GMT -5. The time now is 03:29 AM. |