How do you setup multiple instances of vsftpd to run on different listen ports?

11,639

There are at least 2 ways of doing this

  1. run in standalone mode
    setup several different vsftpd conf files.
    In each set a different listen_port and call each with vsftpd /path/to/conf/file
    make sure to also enable standalone mode in each conf file (set listen to YES and disable vsftpd in inet/xinet)
  2. using systemd.unit to control the different configuration files (using systemctl start @service notation)

In your case simply create the 2 conf files, and start both instances as per option 1

Share:
11,639

Related videos on Youtube

Phil
Author by

Phil

Updated on September 18, 2022

Comments

  • Phil
    Phil over 1 year

    I need to setup 2 different instances of vsftpd. Which will listen on 2 different ports such that one instance listens on the default port 21 and the other can listen on another port 1123. Please guide me on how to setup vsftpd to listen on 2 different ports. I have the following vsftpd.conf file:

    listen=YES
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    dirmessage_enable=YES
    use_localtime=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    xferlog_file=/var/log/vsftpd.log
    ftpd_banner=Welcome to the FTP Service.
    chroot_local_user=YES
    secure_chroot_dir=/var/run/vsftpd/empty
    pam_service_name=vsftpd
    rsa_cert_file=/etc/ssl/private/vsftpd.pem
    
  • joeg1ff
    joeg1ff almost 10 years
    I'm not sure why you need the two different ports so the iptables redirect might not work for you.
  • Dani_l
    Dani_l almost 10 years
    Can't comment directly to your solution so commenting on my own answer - you might want to consider also using different log files for each instance, but that is a matter of personal preference.