ftp: connect: Connection refused



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.

By : singlehop.com



Related Posts:



Responses

0 Respones to "ftp: connect: Connection refused"

Post a Comment

»Thank you for reading this article
If you have questions or comments, please leave a comment
»You can click on the Subscribe by email to subscribe comments of this post
»You can register directly link pictures, mp3, video on the comment form.
»You may use some HTML tags such
»Please post comments polite and typing accented Vietnamese if possible
»Thank the good faith comment

 

Categories

Recent Comments

Total Pageviews

Return to top of page ©Web Server Tips Tricks 2010 | Develop by Mr.PhanQuan .Powered by Blogger . All rights reserved.