Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 12 down vote accepted

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

listen_address=127.0.0.1

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

listen=yes

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

listen_ipv6=yes
listen_address6=::1

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

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

share|improve this answer
1  
My config file needed an '=' between the listen_address and the 127.0.0.1 –  Akber Choudhry Oct 13 '13 at 11:18
    
My config also required the '=' between property and value –  David Aug 25 '14 at 18:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.