Re: how to Port Forward

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

 



Am Do, den 09.06.2005 schrieb Shahzad Chohan um 16:32:

> Basically I tried the NAT command but it wouldn't work, I think the
> destination server 192.168.1.2 is talking back to the client directly
> as opposed to going back to the 192.168.1.1 originating server then to
> the client.

Yes, sorry, I missed the SNAT part in my first reply.

> Shaz

iptables -A PREROUTING -t nat -d 192.168.1.1 -p tcp --dport 22 -j DNAT
--to 192.168.1.2:22
iptables -A POSTROUTING -t nat -s 192.168.1.2 -p tcp --dport 22 -j
SNAT --to 192.168.1.1:22

These are the 2 rules necessary on the NATing host.

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:39:36 up 16 days, 15:17, load average: 0.12, 0.12, 0.09 

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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux