FTP client behind a gateway
Hello. I don't know if anybody else faced this problem, but when I'm behind a gateway (using iptables to perform NAT), I can connect to any FTP server (using the client machines behind the gate) but when I request a directory listing by using the "ls" command, it refuses to enter passive mode. The same doesn't happen when I do it with the gateway machine. Any solutions or ideas ? Thanks again.
Julio Cesar Ody
Quoted 6 lines · Julio Cesar Ody
Hello. I don't know if anybody else faced this problem, but when I'm behind a gateway (using iptables to perform NAT), I can connect to any FTP server (using the client machines behind the gate) but when I request a directory listing by using the "ls" command, it refuses to enter passive mode. The same doesn't happen when I do it with the gateway machine. Any solutions or ideas ? Thanks again.
I know you're using passive mode and not active, but have you included support (either compiled in or as a module) for ftp connection tracking and ftp nat ?
NAT still needs to know the port numbers used in passive ftp, so it needs the helper module loaded in order to see the PORT command.
Antony.
Signature · 3 lines
Documentation is like sex: when it's good, it's very very good; when it's bad, it's still better than nothing.
Quoted 2 lines
Hello. I don't know if anybody else faced this problem, but when I'm behind a gateway (using iptables to perform NAT), I can connect to
any
Quoted 4 lines
FTP server (using the client machines behind the gate) but when I request a directory listing by using the "ls" command, it refuses to enter passive mode. The same doesn't happen when I do it with the gateway machine. Any solutions or ideas ? Thanks again.
If you compiled these as modules ;
do you have the ip_nat_ftp and ip_conntrack_ftp modules loaded (lsmod) ?
Rob