I just installed VSFTPD on my Ubuntu system, but it doesn't seem to work properly.

In the config file i only changed the "local_enable", "write_enable" and "listen" to YES.

When I use "netstat -tanp" or similar commands they only show me "22:sshd" but nothing on port 21.

I tried restarting VSFTPD and i tried restarting my whole VPS. Reinstalling VSFTPD didn't help either.

The weird thing was: Before i restarted my VPS for the first time it was listening on IPv6 Port21, but now it doesn't even listen on that anymore.

I tried everything that google told me but nothing works. It's a fresh installation of ubuntu 16.04.4, and vsftpd is version 3.0.3

(when i try to just type "vsftpd" into my console, it tells me "500 OOPS: ruin two copies of vsftpd for IPv4 and IPv6)

TL;DR: VSFTPD not listening on Port21, any tips why?

  • Could you provide output from command lsof -i :21? – mariaczi Jul 5 '18 at 13:17

This is because vsftpd can only listen on either IPv4 or IPv6. By default, vsftpd binds to the IPv6 socket. However, also by default, the kernel automatically opens and binds the equivalent IPv4 port (ref)

# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.

Your Answer

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

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