I have a legacy app that needs FTP and cannot do SFTP.

My solution is:

  • put an FTP server in place using VSFTPD
  • configure the firewall to accept port 21 connections only from localhost
  • Set up an SSH connection from the client with the legacy app
  • Tunnel the FTP through SSH

I'm wondering though if I can configure VSFTPD to ignore connections from anywhere but localhost on its own, in addition to the firewall. Belt and bracers both.

1 Answer 1


Yes. Configure the vsftp server to listen only on this can be done in the vsftp.conf file:


To use this parameter, the server needs to be in standalone mode:


If you want to use IPv6, use these entries instead:


This is the same as the first, but uses IPv6.

You'll almost certainly have to restart to make this work.

  • 1
    My config file needed an '=' between the listen_address and the Oct 13, 2013 at 11:18
  • My config also required the '=' between property and value
    – David
    Aug 25, 2014 at 18:19
  • The first alternative doesn't need specify anything about localhost, which probably means it listens on all interfaces. The second specfiies localhost. So how can they be "the same" except for IPv6? Localhost also exists for IPv4. Jun 10 at 4:58

You must log in to answer this question.

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