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

Problems with downloading files behind debian server



Hello All,

A bit weird problem. When I want to download from an FTP server I get the
next error message:

200 Switching to ASCII mode.
500 Illegal PORT command.
500 Unknown command.

When I try a debian-mirror:
200 Type set to A.
500 Illegal PORT Command
500 'LPRT 6,16,0,0,0,0,0,0,0,0,67,0,0,0,0,0,203,96,2,5,147': command not
understood.

I'm using Windows XP Pro for downloading, so I think it has to do with XP's
use of ftp, but I don't know what to do.
Maybe there's something wrong in the IPTABLES script? In the attachment is
my IPTABLES script from the server/router. I hope you can help me.

HTH,

Willem-Jan Meijer


<-- Alle e-mailberichten worden op virussen gescand -->
<-- All e-mailmessages are scanned for virusses -->

echo -n "IPTables Firewall."
IPTABLES="/sbin/iptables"

#FLUSH
echo -n "Flush all tables."
$IPTABLES --flush
echo -n "."
$IPTABLES --table nat --flush
echo -n "."
$IPTABLES --delete-chain
echo -n "."
$IPTABLES --table nat --delete-chain
echo ". done"

echo -n " Setting up masquerading rules."
# Set up IPFORWARDing and Masquerading
$IPTABLES --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
echo -n "."
$IPTABLES --append FORWARD --in-interface eth1 -j ACCEPT
echo ". done"

echo -n "Setting rules for loopback device."
# Allow loopback access.
$IPTABLES -A INPUT -i lo -p all -j ACCEPT
echo -n "."
$IPTABLES -A OUTPUT -o lo -p all -j ACCEPT
echo -n "."

echo -n "Setting rules for eth0 device."
# accept established connections
$IPTABLES -A INPUT -i eht0 -m state --state ESTABLISHED,RELATED -j ACCEPT
echo -n "."
#$IPTABLES -A INPUT -p tcp --tcp-option ! 2 -j REJECT --reject-with tcp-reset
#echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 21 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 21 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 22 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 22 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 25 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 25 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 80 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 110 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 110 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p tcp -i eth0 --dport 65500:65535 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p udp -i eth0 --dport 65500:65535 -j ACCEPT
echo -n "."
$IPTABLES -A INPUT -p icmp -i eth0 -j ACCEPT
echo ". done"

echo -n " Setting rules for eth1 device."
# Accept all incoming connections
$IPTABLES -A INPUT -i eth1 -p all -j ACCEPT
echo ". done"

echo -n " Drop all other connection attempts."
$IPTABLES -P INPUT DROP
echo ". done"

Reply to: