星期五, 10月 27, 2006

MASQUERADE: Router send us somewhere else

After I turn on the iptable in the linux, the message keeps pop up.
Finally I solved the issue:

Change the original command

iptables -t nat -A POSTROUTING -s 192.168.101.0/24 -j MASQUERADE

to

iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.101.0/24 -j MASQUERADE
%called as SNAT (source NAT, since it replaces the source ip to the ppp0)

But if the ppp0 is using the dynamic IP , this one may need some modifications so as to get the CURRENT IP address.

沒有留言: