Redirecting passive FTP
Hi
I'm having trouble with redirecting the trafic to my ftp-server. The
problem only exist when dealing with passive traffic/ connection in the
high portnumbers. So i would be very please if anyone will write thos few
lines for me..
All connections enters at: 10.0.0.2 / eth0 / $WAN_IP
FTP-server ip-address is: 172.16.0.49 / $PUBLIC
Pure-ftpd's Passive Port Range is: 37000 38000
I cleared out all the prerouting, state and others that i been trying.
iptables -t nat -A PREROUTING -d $WAN_IP -p tcp --dport 20 -j DNAT
--to $PUBLIC:20
iptables -t nat -A PREROUTING -d $WAN_IP -p tcp --dport 21 -j DNAT
--to $PUBLIC:21
iptables -A INPUT -p tcp -m multiport --dport 37000-38000 -d
$PUBLIC -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dport 20,21 -d $PUBLIC -j
ACCEPT
Best Regards
/Lars
Reply to: