I have 2 NICs in a Linux 9 installation. One card connects to my lan with a static ip of 192.168.1.1. The other connects to my DSL provider which dynamically allocates the ip.
I did this:
modprobe iptable_nat
# In the NAT table (-t nat), Append a rule (-A) after routing # (POSTROUTING) for all packets going out ppp0 (-o ppp0) which says to # MASQUERADE the connection (-j MASQUERADE). iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# Turn on IP forwarding echo 1 > /proc/sys/net/ipv4/ip_forward
It does not work. When I do a iptables -t nat -n -L It displays:
MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0
once for each time I've executed the above command. (now 7 times). I'm sorry, but this doesn't seem right. 0 to 0? don't think so. So I try different -o values - but always get the same.
Don't get it - Do I need to manually add a route? Completely befuttled and ready to throw in the towell.
Sam