0

I have around 3 internal FTP servers named server1, server2, server3. I have 1 public static IP address and all the traffic for example.com is directed towards it.

Now I need to create a configuration such that if user FTP using ftp://server1.example.com it should land on server1 and if user FTP using ftp://server2.example.com it should land on server2.

I am not sure how can I achieve this. I tried using Squid but it does not work for FTP as FTP does not have concept of host.

3
  • Crush FTP can do this, also supports a lot of extra features like remote directories Commented Oct 29, 2016 at 6:11
  • I downloaded crush ftp but I could only find the option for configuring reverse proxy for HTTP not FTP. If you are certain then I can have a second look into it. Commented Oct 31, 2016 at 15:59
  • you ftp to crush, then crush can ftp to your internal systems, typically with user mapping (add remote folders under user account properties) Commented Oct 31, 2016 at 21:39

1 Answer 1

0

You can't, because FTP doesn't have something like the HOST header that makes this possible with HTTP, as you noted yourself.

What would work for some use cases (obviously not for anon ftp) is to mount the storage of the "backend" servers to the frontend server via NFS and then have user names with "home directories" that point to the NFS mount points. The frontend would do the actual FTP transfers but it gets the disk space from the backend servers.

3
  • Thanks Sven, seems like the solution you provided will work and I will try that. It will involve more overhead of configuring systems whenever a new user is added but seems like that is the only option. I am not sure how these web hosting companies like bluehost or arvixe host the ftp servers. Do they use static IP for all their internal servers. Commented Oct 28, 2016 at 18:05
  • 2
    That's not entirely correct, there is an RFC to implement this. However I don't think it is widely adopted yet (see: serverfault.com/a/672403/56431)
    – faker
    Commented Oct 28, 2016 at 18:06
  • @faker: Interesting to know and to keep an eye out for future developments, but at this point, I would consider having this for SSH much more desirable. I can't even remember when I last used an FTP server (except possible download links in web pages).
    – Sven
    Commented Oct 28, 2016 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .