Re: problems with iptables redirect of ssh



On Monday 28 January 2008 Ruben Laban's cat, walking on the keyboard, wrote:

It most likely works, just not to/from localhost. The PREROUTING chain is
*not* used for such local traffic. If you'd test from another box in your
lan, it will most likely show you the desired results.

Yeah, thanks you were right! It does not work for localhost. Now, more
difficult: if I'd like to forward ssh to another host, the following line
should work

$IPTABLES -t nat -I PREROUTING -p tcp --dport 2222  -j DNAT --to
192.168.1.4:22

but when I try to connect from another host to the port 2222 I get blocked
(i.e., the connection waits) and nothing happens.....Any suggestion?

Thanks,
Luca


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages