Yesterday I upgraded my ISPConfig 3.1 beta on CentOS 7.2 and an FTP client (a wview weather station) started failing with this error:
FTP-ERROR: curl_easy_perform failed: Failed to connect to your.ftp.host port 21: No route to host
Surprisingly, another FTP client, a webcam configured for scheduled FTP upload, from the very same LAN was connecting and uploading the image without problems.
Having a look at server logs showed the client connecting but disconnecting right away.
I struggled for some tens of minutes with the error which was quite new to me, at least in the case where connection and routing was showing no problems on the host, an Ubuntu 16.04 server.
The solution was, as often, the simpler I could think of: closed passive ports. The ISPConfig upgrade rewrote all the configs, including PureFTPd one, so it lost the restricted passive port range I opened in iptables. So after adding:
PassivePortRange 29799 29899
to /etc/pure-ftpd/pure-ftpd.conf solved the issue.
Of course I had those ports open. Double checking:
# iptables -L -n [...] Chain IN_public_allow (1 references) target prot opt source destination ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21 ctstate NEW ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpts:29799:29899 ctstate NEW [...]