Hi!
I want to nat the ip x.x.x.x to 192.168.0.y.
I wrote a script and put these lines:
Code:
$IPTABLES -t nat -I PREROUTING -d x.x.x.x -j DNAT --to-destination 192.168.0.y
$IPTABLES -t nat -I POSTROUTING -s 192.168.0.y -d ! 192.168.0.0/23 -j SNAT --to-source x.x.x.x
$IPTABLES -I FORWARD -d 192.168.0.y -j ACCEPT
$IPTABLES -I FORWARD -s 192.168.0.y -j ACCEPT
Then I restart iptables, but it is still not working...when i ping 192.168.0.y - I get a reply, but if i ping the x.x.x.x - destination host unreachable...
What could it be ?