[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: how to Port Forward



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 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]