From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ilo Lorusso" Subject: Portfowarding not working while SNATing, Date: Tue, 15 Jul 2003 08:30:16 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <004e01c34a9a$8f2b3b60$4c00000a@sneak> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004B_01C34AAB.51C0D1C0" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_004B_01C34AAB.51C0D1C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable If have the following set for some port forwarding that I need done, = which works well... /sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d 196.11.11.11 = --dport 80 -j DNAT --to 10.0.0.2:80 /sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d 196.11.11.11 = --dport 389 -j DNAT --to 10.0.0.2:389 then once I set the following for SNAT so my local machines can get = internet access my port forwarding=20 stops working. /sbin/iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 196.11.11.11 Is there something im not doing right? can someone point me in the right = direction. tx. ------=_NextPart_000_004B_01C34AAB.51C0D1C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
If have the following set for some port = forwarding=20 that I need done, which works well...
 
/sbin/iptables -t nat -A PREROUTING = -p tcp -i=20 eth0 -d 196.11.11.11 --dport 80 -j DNAT --to = 10.0.0.2:80
/sbin/iptables -t=20 nat -A PREROUTING -p tcp -i eth0 -d 196.11.11.11 --dport 389 -j DNAT = --to=20 10.0.0.2:389

then once I set the following for SNAT = so my local=20 machines can get internet access my port forwarding
stops working.
 
/sbin/iptables -t nat -A = POSTROUTING -o eth0 -j=20 SNAT --to 196.11.11.11
 
 
Is there something im not doing right? can someone point me in the = right=20 direction.
 
tx.
------=_NextPart_000_004B_01C34AAB.51C0D1C0--