HAProxy community

Ftp connexion trough haproxy



At the moment I have two servers under centos 7.

  • = Loadbalencer with Haproxy
  • = web server

I want the clients to enter their ftp (ex Filezilla) and be redirected automatically to the server I still have not found a way that works well … Thank you very much for helping me.

Here is my current configuration of haproxy.cfg:

log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats timeout 30s
user haproxy
group haproxy

log global
mode http
option httplog
option tcplog
retries 3
maxconn 10000
option redispatch
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000

frontend http_front
bind *:80
default_backend http_back

backend http_back
balance roundrobin
server serveurBack check

listen stats
bind *:8181
stats enable
stats uri /
stats realm Haproxy\ Statistics
stats auth :

frontend ftp-pool
bind *:21 transparent
bind *:30000-35020 transparent
mode tcp
maxconn 2000
option tcplog
option tcp-check
default_backend ftp-pool-backend

backend ftp-pool-backend
balance source
hash-type consistent
server ftp01 check port 21

backend ftp-pool-backend-static
balance source
hash-type consistent

Have a good day



You need to set PASV address to your external IP in ftp configuration.

1 Like