Open jnazander opened 5 years ago
Without passive mode the connection will be used by the 21 port.
And how to enable passive mode ? Because when I using comand line always OK. But when I use FileZilla I have problem Cannot get directory listing I can not view the directory '/'.
Mode is a setting of client apps https://support.tigertech.net/filezilla-passive
I "think" that in reality, this won't work often as FTP clients usually are behind a firewall which shouldn't allow dynamically opened ports being accessible from the internet. So PASV mode seems to be the only reliable option if FTP needs to be offered to large parties with unknown network setups. And that is not covered with this solution.
Does this example actually work? I've just tried this myself on
minikube
, and whenever I connect with an FTP client to my node's IP address on port30080
, it connects and starts the session successfully, but the "Reading remote directory" command times out.I assume this is because the FTP protocol requires opening a connection on a second port (the data port). In your example config, it's chosen by
vsftpd
randomly from the21100-21110
range. But yourNodePort
service only forwards the command port (21
), not the data port, so there is no way this example could work.Even if you would configure
vsftpd
to use a static data port andNodePort
to forward it, there's also the problem ofNodePort
forwarding each new TCP connection to a different pod, so your data connection may arrive at a different pod than your control connection, and will be promptly rejected. In fact, FTP starts a new TCP connection on the data port for every file transferred!This example doesn't resolve ANY of the above issues.