1

I am running an ftp server via vstfpd.

/etc/vsftpd.conf:

listen=YES
#listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
use_localtime=YES
xferlog_enable=YES
#connect_from_port_20=YES
chown_uploads=YES
chown_username=ftpuser
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd

rsa_cert_file=/etc/ssl/certs/vsftpd.pem
rsa_private_key_file=/etc/ssl/certs/vsftpd.pem
ssl_enable=YES
force_local_logins_ssl=YES
force_local_data_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO

pasv_enable=Yes
pasv_address=xxx.xxx.xxx.xxx
pasv_min_port=2212
pasv_max_port=2222
listen_address=xxx.xxx.xxx.xxx
listen_port=2211

userlist_deny=NO
userlist_enable=YES
userlist_file=/etc/vsftpd.users

When I run vsftpd using "sudo vsftpd", I get the following error:

500 OOPS: could not bind listening IPv4 socket

However, the server runs without any errors if I modify the first to lines of the config to look like this:

#listen=YES
listen_ipv6=YES

That being said, only clients that support ipv6 have been able to connect to the server. How do I get this server to successfully run on ipv4 mode?

Note: I am currently not using systemd or xinetd to run vsftpd and I have checked my system to make sure that no vsftpd service is running.

  • Check with netstat -ta that no process is already listening on the ftp port. You didn't mention which operating system you are running, but if you are on Linux, check what systemctl net.ipv6.bindv6only reports. If the bindv6only setting is 1, try changing it to 0 with sudo systemctl net.ipv6.bindv6only=0, disable listen and enable listen_ipv6 in vsftpd.conf. This way a single IPv6 socket accepts connections using both IPv4 and IPv6. – Johan Myréen Jun 22 '17 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy