From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Breno Cardoso Perucchi" Subject: SNAT FTP - HELP ME Date: Wed, 9 Apr 2003 10:35:47 -0300 Sender: netfilter-admin@lists.netfilter.org Message-ID: <006801c2fe9c$ee27bc50$1c01010a@PERUCCHI> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0065_01C2FE83.C8A395D0" 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_0065_01C2FE83.C8A395D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, This is my first mail to the list. =20 I've been trying to transport tcp 20:21 to out of my network with SNAT = iptables -t nat -A POSTROUTING -p tcp --dst 200.200.200.201 --dport = 20:21 -j SNAT --to-source 192.168.2.1 This is my network =20 Firewall eth0:200.100.100.100 (NAT to 192.168.2.0/24) eth1:200.200.200.200 (Another Class the IP) eth2:192.168.2.50 (LAN) Server1 in Network 192.168.2.1 =20 My firewall have this rule in the NAT =20 iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j SNAT --to = 200.100.100.100 This is my problem. I transport all ports of the ip 200.200.200.201 to = the 192.168.2.1 =20 iptables -t nat -A PREROUTING -p tcp -d 200.200.200.201 -j DNAT --to = 192.168.2.1 =20 =20 But all the ports don't get out with IP 200.200.200.201 and yes with IP = of Masquerade 200.100.100.100 =20 My I need to resolved this .=20 Breno Cardoso Perucchi breno@omegatec.net Consultor - Omega Tecnologia http://www.omegatec.net/ ------=_NextPart_000_0065_01C2FE83.C8A395D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hello,
 
This is my first mail to the = list.  =20
I've been trying to transport tcp 20:21 to out of my network with=20 SNAT  
iptables -t nat -A POSTROUTING -p tcp = --dst=20 200.200.200.201 --dport 20:21 -j SNAT --to-source = 192.168.2.1

This is my network 
Firewall
eth0:200.100.100.100  (NAT to 192.168.2.0/24)
eth1:200.200.200.200  (Another Class the IP)
eth2:192.168.2.50    (LAN)

Server1 in Network  192.168.2.1 
My firewall have = this=20 rule in the NAT  
iptables -t nat -A POSTROUTING -s = 192.168.2.0/24=20 -j SNAT --to 200.100.100.100
 
This is my problem. I transport all ports of the ip 200.200.200.201 = to the=20 192.168.2.1 
iptables -t nat -A PREROUTING -p tcp -d = 200.200.200.201 -j=20 DNAT --to 192.168.2.1 
 
But all the ports = don't get=20 out with IP 200.200.200.201 and yes with IP of Masquerade=20 200.100.100.100 
My I need to resolved this .
 
Breno Cardoso Perucchi
breno@omegatec.net
Consultor - = Omega=20 Tecnologia
http://www.omegatec.net/
=
------=_NextPart_000_0065_01C2FE83.C8A395D0-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: xchris Subject: Re: SNAT FTP - HELP ME Date: Wed, 9 Apr 2003 16:18:56 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <200304091618.56344.lyra@fastwebnet.it> References: <006801c2fe9c$ee27bc50$1c01010a@PERUCCHI> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <006801c2fe9c$ee27bc50$1c01010a@PERUCCHI> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: Breno Cardoso Perucchi , netfilter@lists.netfilter.org On Wednesday 09 April 2003 03:35 pm, Breno Cardoso Perucchi wrote: > Hello, > > This is my first mail to the list. > I've been trying to transport tcp 20:21 to out of my network with SNAT > iptables -t nat -A POSTROUTING -p tcp --dst 200.200.200.201 --dport 20:= 21 > -j SNAT --to-source 192.168.2.1 you cannot use DNAT with ftp protocol due to the multi connection protoco= l. If you redirect port 21 you redirect only the control connection and not = the=20 data connection. Consider using sftp. bye xchris From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Breno Cardoso Perucchi" Subject: SNAT FTP - HELP ME Date: Tue, 8 Apr 2003 13:26:35 -0300 Sender: netfilter-admin@lists.netfilter.org Message-ID: <08ff01c2fdeb$a1d35a00$1c01010a@PERUCCHI> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_08FC_01C2FDD2.7A3B47A0" 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_08FC_01C2FDD2.7A3B47A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, This is my first mail to the list. =20 I've been trying to transport tcp 20:21 to out of my network with SNAT = iptables -t nat -A POSTROUTING -p tcp --dst 200.200.200.201 --dport = 20:21 -j SNAT --to-source 192.168.2.1 This is my network =20 Firewall eth0:200.100.100.100 (NAT to 192.168.2.0/24) eth1:200.200.200.200 (Another Class the IP) eth2:192.168.2.50 (LAN) Server1 in Network 192.168.2.1 =20 My firewall have this rule in the NAT =20 iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j SNAT --to = 200.100.100.100 This is my problem. I transport all ports of the ip 200.200.200.201 to = the 192.168.2.1 =20 iptables -t nat -A PREROUTING -p tcp -d 200.200.200.201 -j DNAT --to = 192.168.2.1 =20 =20 But all the ports don't get out with IP 200.200.200.201 and yes with IP = of Masquerade 200.100.100.100 =20 My I need to resolved this .=20 Breno Cardoso Perucchi breno@omegatec.net Consultor - Omega Tecnologia http://www.omegatec.net/ ------=_NextPart_000_08FC_01C2FDD2.7A3B47A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello,
 
This is my first mail to the = list.  =20
I've been trying to transport tcp 20:21 to out of my network with=20 SNAT  
iptables -t nat -A POSTROUTING -p tcp = --dst=20 200.200.200.201 --dport 20:21 -j SNAT --to-source = 192.168.2.1

This is my network 
Firewall
eth0:200.100.100.100  (NAT to 192.168.2.0/24)
eth1:200.200.200.200  (Another Class the IP)
eth2:192.168.2.50    (LAN)

Server1 in Network  192.168.2.1 
My firewall have = this=20 rule in the NAT  
iptables -t nat -A POSTROUTING -s = 192.168.2.0/24=20 -j SNAT --to 200.100.100.100
 
This is my problem. I transport all ports of the ip 200.200.200.201 = to the=20 192.168.2.1 
iptables -t nat -A PREROUTING -p tcp -d = 200.200.200.201 -j=20 DNAT --to 192.168.2.1 
 
But all the ports = don't get=20 out with IP 200.200.200.201 and yes with IP of Masquerade=20 200.100.100.100 
My I need to resolved this .
 
Breno Cardoso Perucchi
breno@omegatec.net
Consultor - = Omega=20 Tecnologia
http://www.omegatec.net/
=
------=_NextPart_000_08FC_01C2FDD2.7A3B47A0--