Is there any way to reverse proxy FTP (or SFTP) connections as you can do with HTTP traffic? I already have working setup fot HTTP connections with nginx-proxy and I was wondering if I can route the FTP connections in similar way:

User connects ftp.domain1.com --> FTP proxy --> container1 (with -e HOST=ftp.domain1.com)
User connects ftp.domain2.com --> FTP proxy --> container2 (with -e HOST=ftp.domain2.com)

And both of the containers are running in the same machine and have the same IP address.


No, because those protocols lack an in-band way of signalling the name of the host they wish to connect to (cf HTTP's Host request header).

  • I'm beginning to wonder if it's time for a canonical question about hostname-unaware services, and how you can't proxy/redirect/frotz them based on the hostname that was looked up by the client? – MadHatter Oct 5 '17 at 9:56
  • It's long overdue, IMO. – womble Oct 5 '17 at 10:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.