Cant connect to vsFTPD server, timeout on directory listing

Issues related to applications and software problems
Post Reply
PresFox
Posts: 10
Joined: 2018/05/21 08:55:26

Cant connect to vsFTPD server, timeout on directory listing

Post by PresFox » 2018/05/21 08:57:47

I am trying to setup vsFTPD on my server, it works, runs and connects, but when trying to connect to the server with filezilla i get the following error:

Code: Select all

    Status:	Connection established, waiting for welcome message...
    Status:	Insecure server, it does not support FTP over TLS.
    Status:	Logged in
    Status:	Retrieving directory listing...
    Command:	PWD
    Response:	257 "/var/www/html"
    Command:	TYPE I
    Response:	200 Switching to Binary mode.
    Command:	PASV
    Response:	227 Entering Passive Mode (193,23,181,154,235,226).
    Command:	LIST
    Error:	The data connection could not be established: ETIMEDOUT - Connection 
    attempt timed out
I already set vsftpd config:
Image

And setup rules in the firewall:

Image

What am i doing wrong / do i need to add?

User avatar
TrevorH
Forum Moderator
Posts: 23201
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cant connect to vsFTPD server, timeout on directory listing

Post by TrevorH » 2018/05/21 09:22:35

Remove the config for the PASV ports and the iptables rules for them. Instead modprobe nf_conntrack_ftp and that does it for you. Edit /etc/sysconfig/iptables-config and add that module to the list to load automatically or, if using firewalld, use firewall-cmd --add-service=ftp not --add-port. You can also remove the iptables rule for port 20, only 21 is needed.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

PresFox
Posts: 10
Joined: 2018/05/21 08:55:26

Re: Cant connect to vsFTPD server, timeout on directory listing

Post by PresFox » 2018/05/21 12:45:45

that did it, thanks

Post Reply