FTP through HAProxy
I found out the solution. It seems I had to use a directive pasv_address
with the IP of the system. I will post again the settings I've used to make it work.
Supposing our public IP is 217.130.100.62
, here we have an extract of /etc/vsftpd.conf
in the Guest:
# Passive mode
tcp_wrappers=YES
pasv_address=217.130.100.62
pasv_enable=YES
pasv_promiscuous=NO
port_enable=YES
port_promiscuous=NO
pasv_min_port=10000
pasv_max_port=10250
And here, a simplified directive in /etc/haproxy/haproxy.cfg
in the Host:
listen FTP :21,:10000-10250
mode tcp
server ftp01 192.168.122.152 check port 21