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

Redirecting ftp


I'm having at strange problem with a Pure-Ftpd-MySQL. I got at firewal that
also hosts ftp and a smtp-gateway, plus the FW redirects web and some other
ports to another server. 
The firewall is on and it's outside IP is The inside
is only one NIC, but it's divided into four. 
¤ eth1:1 - (Ftp)
¤ eth1:2 - (MAIL)
¤ eth1:3 - (gateway for subnet)

My problem is when I try to connect to the ftpd-server from the outside. I
can connect to the server, and the ftpd-log confirm that the user is logged
in "[INFO] nogetfx is now logged in". But then the client, in this case
gftp, stall. In gftp it's stock a "Receiving file names...". 

Part of the iptables-script:

   # ¤¤¤ FTP ¤¤¤
        iptables -t nat -A PREROUTING -d $WAN_IP -p udp --dport 20 -j DNAT
--to $PUBLIC:21
        iptables -t nat -A PREROUTING -d $WAN_IP -p tcp --dport 20 -j DNAT
--to $PUBLIC:21
        iptables -t nat -A PREROUTING -d $WAN_IP -p udp --dport 21 -j DNAT
--to $PUBLIC:21
        iptables -t nat -A PREROUTING -d $WAN_IP -p tcp --dport 21 -j DNAT
--to $PUBLIC:21

        iptables -A INPUT -p udp --dport 20 -d $PUBLIC -j ACCEPT
        iptables -A INPUT -p tcp --dport 20 -d $PUBLIC -j ACCEPT
        iptables -A INPUT -p udp --dport 21 -d $PUBLIC -j ACCEPT
        iptables -A INPUT -p tcp --dport 21 -d $PUBLIC -j ACCEPT

BTW is udp necesarry..?


Message sent using UebiMiau 2.7.8 on http://www.mxhotel.dk

Reply to: