2

I want to have 2 configurations on 1 server:

  • 1 connection FTP/TLS on a public address
  • 1 connection unsecure on local network.

It is working on TLS, and it is working on local network. But it does not work with the 2 configurations at the same time. How can I do it?

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
alain91620
  • 21
  • 1

1 Answers1

0

Assuming you are configuring a host that is behind a router with a LAN IP common to external connections and local connections (if not, that's to say, you have two IP address in your host, you could make use of VirtualHosts IP based), as I can see it, you could:

  • Use a different port for the external connection (after all, you could redirect the external standard FTP port to your new "different port" in the server) and use it in VirtualHost with a Port line properly configured. You should enable two ranges of ports for passive connections and make the range for your external FTP open in your router and connected to your FTP server.
  • Use, as the author of proftpd (Cataglia) notes in his answer here, two names in the access to your server, one from the Internet and the other from your LAN, and configure VirtualHosts based on those names (RFC 7151).

Of course you could use two physical network interfaces in your server or two IP address in the same physical interface and configure two VirtualHost IP based.

It is also possible to run two instances of proftpd with two different configurations taking advantage of systemd @ files

Summing it up, you could configure two VirtualHost IP, port or name based or two services with different configurations.

Hope it helps

J.M. Robles
  • 865
  • 6
  • 9