ftp configurion in iptables

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

 



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

 

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? on remote server.

 

Please give me solution to solve this problem.

 

Regards,

 

 

****************************************

Kashif Latif

Network Support Officer

Innovative Pvt Ltd.

****************************************

 


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux