how to Port Forward

Alexander Dalloz ad+lists at uni-x.org
Thu Jun 9 14:30:17 UTC 2005


Am Do, den 09.06.2005 schrieb Alexander Dalloz um 16:20:

> > If I am wrong then can someone please show me how to do it with NAT.
> 
> > Shaz 
> 
> It is no problem.
> 
> iptables -A PREROUTING -i <input device> -p tcp --dport 22 -j DNAT --to
> <target IP>:22022
> 
> Alexander

Sorry, forgot about the SNAT rule:

iptables  -A POSTROUTING -t nat -s <target IP> -p tcp --dport 22022 -j
SNAT --to <input IP>:22

You see, DNAT and SNAT have to be inverse rules.

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.27_FC2smp 
Serendipity 16:27:21 up 16 days, 15:05, load average: 0.19, 0.19, 0.09 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20050609/75694882/attachment-0002.bin 


More information about the users mailing list