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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050609/75694882/attachment-0001.sig>
More information about the fedora-list
mailing list