Symptoms
One of the following error messages appears, when connecting to a server via FTP in active mode:
Connection timed out
Connection refused
Connection attempt failed with "ETIMEDOUT - Connection attempt timed out".
Cause
TCP ports 21 and/or 20 is/are filtered.
Resolution
Enable Plesk Firewall to open these ports locally on the server.
Enable Plesk Firewall to open these ports locally on the server.
-
Connect to the Plesk server via SSH.
-
Install the optional package for managing iptables:
-
for CentOS/RHEL-based distributions:
# yum install -y iptables-services
# systemctl enable iptables-services -
for Debian/Ubuntu-based distributions:
# apt install -y iptables-persistent
-
-
Allow incoming connections to the ports 20 and 21:
-
for CentOS/RHEL-based distributions:
# iptables -I INPUT 1 -p tcp --dport=20 -j ACCEPT
# iptables -I INPUT 1 -p tcp --dport=21 -j ACCEPT
# service iptables save -
for Debian/Ubuntu-based distributions:
# iptables -I INPUT 1 -p tcp --dport=20 -j ACCEPT
# iptables -I INPUT 1 -p tcp --dport=21 -j ACCEPT
# iptables-save > /etc/iptables/rules.v4
-
-
Connect to a Plesk server via RDP.
-
Open Windows Firewall in Control Panel.
-
In Windows Firewall, click Advanced settings > Inbound Rules.
-
Make sure the following FTP rules are enabled.
If after opening the FTP ports in a server firewall these ports are still blocked, make sure that:
- A third-party firewall, in case it is used, is not blocking the connection to the FTP ports.
-
An intermediary firewall between a Plesk server and the Internet is not filtering the FTP ports. Contact your Internet Service Provider (ISP) for assistance.