Force ProFTPD to listen on only one IP

It's not quite as clean as the socket binding under Apache but the principle works something like this.

  1. In Standalone mode, to listen on the primary IP of a host use the SocketBindTight directive.

    In "/etc/proftpd.conf":

    SocketBindTight                 on
    
  2. To listen on a interfaces which are not the primary host interface, use the SocketBindTight directive, place your server configuration in a block and use "Port 0" for the main host configuration and and "Port 21" inside the VirtualHost block.

    Port                            0
    SocketBindTight                 on
    <VirtualHost xxx.xxx.xxx.xxx>
            Port 21
            DefaultRoot             ~
            AllowOverwrite          on
            Umask                   002
    </VirtualHost>

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Very helpful

We have spent days of drinking and thinking what could be the reason of our FTP not working on the alias'ed IP address.

Setting default port to 0 fixed the issue!

Thanks to the author of this VERY nice tutorial!

Thanks!

Helped me a lot..
When changed from port 21 to 2100 (for security) the server decided to shout on the logs:
unable to listen on 0.0.0.0#21: Address already in use

The parameter fixed the issue :-)

Comment