iptables is like alchemy

Gary Hodder vk2kcf at vk2kcf.com
Thu Jan 3 11:23:31 UTC 2013



I'll try this tomorrow when I get into work. But at first look it seems
awfully familiar, like it's something that I've already tried. Thanks,
though. At this point I'll try whatever somebody thinks might work.


-Alan

Maybe I should have put it this way.

This one does the redirect.
iptables -t nat -A PREROUTING -p tcp -i ppp0 --dport 22 -j DNAT
--to-destination 192.168.0.2:22

Because it goes through the forward chain you also need to allow it
there as well with

iptables -A FORWARD -p tcp -i ppp0 -o eth0 -d 192.168.0.2 --dport 22 -j
ACCEPT

You need both.

Gary.




More information about the users mailing list