From: "Kashif Latif" Subject: ftp configurion in iptables Date: Wed, 26 Mar 2003 18:11:02 +0500 Sender: netfilter-admin@lists.netfilter.org Message-ID: <000701c2f399$26bcf9e0$2100a8c0@i2c.com> Mime-Version: 1.0 Content-Type: multipart/alternative;boundary="----=_NextPart_000_0008_01C2F3C3.0F9301E0" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.samba.org This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C2F3C3.0F9301E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Sir, =20 I am getting problem in ftp. I configured firewall on Linux 8.0 with Iptables. I did this configuration =20 iptables -A INPUT -p tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT=20 iptables -A OUTPUT -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED -j ACCEPT=20 iptables -A OUTPUT -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED -j ACCEPT=20 =20 For Nat=20 =20 iptables =96t nat -A POSTROUTING -p tcp --dport 21 -m state --state NEW,ESTABLISHED -j MASQUERADE iptables =96t nat -A POSTROUTING -p tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED -j MASQUERADE =20 Users from NAT are able to connect to remote FTP server but when they type dir, ls commands. It returns error connection closed by remote machine. =20 How can I configure NAT then user from their machine able to FTP on remote server. =20 Please give me solution to solve this problem. =20 Regards, =20 =20 **************************************** Kashif Latif Network Support Officer Innovative Pvt Ltd. **************************************** =20 ------=_NextPart_000_0008_01C2F3C3.0F9301E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello = Sir,

 

I am getting problem in = ftp. I configured firewall on Linux 8.0 with Iptables. I did this = configuration

 

iptables -A INPUT     = -p tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT
iptables -A = OUTPUT -p tcp --dport 21 -m = state --state NEW,ESTABLISHED -j = ACCEPT

iptables -A INPUT     = -p tcp --sport 1024: --dport 1024:  -m state --state ESTABLISHED -j ACCEPT =
iptables -A = OUTPUT -p tcp --sport 1024: = --dport 1024:  -m state --state ESTABLISHED,RELATED -j ACCEPT
 
 For Nat

 

iptables –t nat -A POSTROUTING -p tcp --dport 21 -m = state --state NEW,ESTABLISHED -j = MASQUERADE

iptables –t nat -A POSTROUTING -p tcp --sport 1024: = --dport 1024:  -m state --state ESTABLISHED,RELATED -j MASQUERADE

 <= /p>

Users from NAT are able to connect to remote = FTP server but when they type dir, ls commands. It returns error connection closed by remote = machine.

 

How can I configure NAT then user from their = machine able to FTP=A0 on remote = server.

 

Please give me solution to = solve this problem.

 

Regards,

 

 

***********= *****************************

Kashif Latif

Network Support = Officer

Inn= ovative Pvt Ltd.

***********= *****************************

 

------=_NextPart_000_0008_01C2F3C3.0F9301E0--