Cannot use FTP connection with iptables - TechRepublic
General discussion
June 27, 2003 at 08:58 PM
hung

Cannot use FTP connection with iptables

by hung . Updated 21 years, 6 months ago

Hi all friends,
I have a problem with iptables. I configured iptables to share my Leased Line (128 Kbps) on the LAN. There are problems with connecting FTP throught NAT to FTP server (such as FTP server on Windows 2000 Advance Server.), it has someerrors such as “PORT command failed”… So, I cannot list any folders or files in this FTP server.

Note: But, with FTP server on LINUX server machine, it hasn’t the same error as on Windows SR machine.

Ok, here is my list of IPTABLES -L

#Generated by iptables-save v1.2.6a on Wed Jun 25 15:18:36 2003
*nat
:PREROUTING ACCEPT [198210:16277982]
:POSTROUTING ACCEPT [526:42386]
:OUTPUT ACCEPT [43:4667]
[187289:14464801] -A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Wed Jun 25 15:18:36 2003
# Generated by iptables-save v1.2.6a on Wed Jun 25 15:18:36 2003
*filter
:INPUT ACCEPT [14034:2080911]
:FORWARD ACCEPT [376631:89228987]
:OUTPUT ACCEPT [1669:175943]
[0:0] -A INPUT -p tcp -m tcp –dport 22 -j ACCEPT
[38:14498] -A INPUT -p tcp -m tcp –dport 80 -j ACCEPT
[40:1684] -A INPUT -p tcp -m tcp –dport 23 -j ACCEPT
[0:0] -A INPUT -p tcp -m tcp –dport 110 -j ACCEPT
[0:0] -A INPUT -p tcp -m tcp –sport 21 -j ACCEPT
[0:0] -A OUTPUT -p tcp -m tcp –sport 6699 -j REJECT –reject-with icmp-port-unreachable
[0:0] -A OUTPUT -p tcp -m tcp –sport 21 -j REJECT –reject-with icmp-port-unreachable
COMMIT
# Completed on Wed Jun 25 15:18:36 2003

This discussion is locked

All Comments