Hello,
I am trying to get my 2nd NIC card to masquerade using iptables. Here is my setup:
eth0 = Internet Link
eth1 = wireless AP
I would like to have all the traffic moving from eth1 to eth0 and back. I have tried to set the following in my iptables and it worked the first time I set it up. Upon reboot however, I didn't have the settings defined and I tried to do them again, to no avail. This time it didn't work, and it still doesn't.
1) echo "1" > /proc/sys/net/ipv4/ip_forward
2) iptables -F
3) iptables -A FORWARD -o eth0 -s 192.168.2.0/24 -j ACCEPT
4) iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j MASQUERADE
5) iptables -A FORWARD -j LOG
I try over and over and for some reason I get no traffic. I even tried to set a log setup for iptables, only to see that it is not invoked what-so-ever.
I appreciate any help with this, this is driving me nuts. Rninja
I am trying to get my 2nd NIC card to masquerade using iptables. Here is my setup:
eth0 = Internet Link
eth1 = wireless AP
I would like to have all the traffic moving from eth1 to eth0 and back. I have tried to set the following in my iptables and it worked the first time I set it up. Upon reboot however, I didn't have the settings defined and I tried to do them again, to no avail. This time it didn't work, and it still doesn't.
1) echo "1" > /proc/sys/net/ipv4/ip_forward
2) iptables -F
3) iptables -A FORWARD -o eth0 -s 192.168.2.0/24 -j ACCEPT
4) iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j MASQUERADE
5) iptables -A FORWARD -j LOG
I try over and over and for some reason I get no traffic. I even tried to set a log setup for iptables, only to see that it is not invoked what-so-ever.
I appreciate any help with this, this is driving me nuts. Rninja
![smlogo.gif](http://www.rninja.com/icon/smlogo.gif)