0

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.

Roope
  • 11
  • 3

1 Answers1

4

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).

womble
  • 95,029
  • 29
  • 173
  • 228
  • 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 05 '17 at 09:56
  • It's long overdue, IMO. – womble Oct 05 '17 at 10:55