Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: ftp: connect: Connection refused  (Read 3560 times)

0 Members and 1 Guest are viewing this topic.

Haripriya H

  • Guest
ftp: connect: Connection refused
« on: November 22, 2013, 10:48:15 pm »
Guys,

If you get this type of error message, please check the server's firewall first. I have faced this error message during connecting to the FTP server. In my case passive ports ranges were not enabled in the FTP and iptables firewall.

====
PassivePortRange 30000 50000
====

Add the above line in the ftp configuration file and enable them in the iptables like :

=====
iptables -A INPUT -p tcp --destination-port 30000:50000 -j ACCEPT
iptables -A OUTPUT -p tcp --source-port 30000:50000 -j ACCEPT
=====

Then restart iptables and ftp server like :

====
service iptables restart
/etc/init.d/pure-ftpd restart
====

If above solutions don't work please configure CSF+LFD firewall on the server and stop iptables. This will solve the problem.

Another important point is that you may connect to the server through "active mode [server will connect to the client]" through the FTP client(like filezilla). Just enable the option a the FTP client and retry to connect. That's it.

Try :)