>
> If you managed to set it up (the way it is wanted) could you be so kind
> and post your iptables directives here...
Sure, here you go:
On client:
iptables -t nat -A OUTPUT -p tcp -d 172.24.113.163 --dport 222 -j DNAT
--to-destination 172.24.113.163:2222
On Server:
iptables -t nat -I PREROUTING -p tcp -d 172.24.113.163 --dport 2222 -j DNAT
--to-destination 172.24.113.163:22
Then:
[root@client ]$ ssh -p 222 root@server
root@server's password:
Last login: Mon Feb 7 12:16:24 2005 from localhost.localdomain
[root@server ~]#
On client:
[root@client ]# netstat -tan | grep :222
tcp 0 0 CLIENT_IP_ADDRESS:49101 172.24.113.163:222
ESTABLISHED
[root@client ]# iptables -t nat -L OUTPUT -v
Chain OUTPUT (policy ACCEPT 15450 packets, 1122K bytes)
pkts bytes target prot opt in out source
destination
3 180 DNAT tcp -- any any anywhere server
tcp dpt:222 to:172.24.113.163:2222
On server:
[root@server ~]# netstat -tan | grep :22
tcp 0 0 172.24.113.163:22 CLIENT_IP_ADDRESS:49101
ESTABLISHED
[root@server ~]# iptables -t nat -L PREROUTING -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
1 60 DNAT tcp -- any any anywhere server
tcp dpt:2222 to:172.24.113.163:22
Regards,
Vincent.
>
> TIA
> Marek
--
Kelkoo Security Manager / Networks & Systems Architect
JID:
(E-Mail Removed) / Vincent.Jaussaud.AT.kelkoo.DOT.net
Kelkoo.com --- GNU/Linux Powered