FTP Error: The data connection could not be established: ETIMEDOUT – Connection attempt timed out

When using ftp to access the server, the following error logs:

# Error: The data connection could not be established: ETIMEDOUT - Connection attempt timed out

If you are on a plesk server, Plesk has an article here: https://docs.plesk.com/en-US/onyx/administrator-guide/server-administration/plesk-for-linux-configuring-passive-ftp-mode.74643/
To enable passive FTP mode in Plesk for Linux:
Log in to your server via SSH as the root user.
Create the /etc/proftpd.d/55-passive-ports.conf file, add the following lines to it, and then save the changes:

# nano /etc/proftpd.d/55-passive-ports.conf
PassivePorts 49152 65535

Run the following command:

# systemctl restart xinetd

Now your Plesk server accepts passive FTP connections. If you have installed the Plesk Firewall and switched on its default configuration, you need to add a firewall rule allowing passive FTP:

  1. Direction: Incoming
  2. Action: Allow
  3. Ports: TCP 49152-65535
  4. Sources: (any host)

Save and connect via ftp to test.

Still having issues?

Check is firewalld is loaded but not enabled? Try to start and then and stop firewalld service.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.