FTP error – ECONNREFUSED – Connection refused by server-Proftp

When connecting to the server via ftp and you are sure about the credentials and the firewall rules and iptables. Check DNS and the proftpd.conf file:

# dig domain.com
domain.com.       21599   IN      A       216.xx.xx.xx


# nano /etc/proftpd.conf
Port                            21
MasqueradeAddress       216.xx.xx.xx
PassivePorts                    60000 65000

Check the MasqueradeAddress feature and see if matched your IP for the domain you are connecting to.

Also – if behind a firewall…

Create a VirtualHost for 216.xx.xx.xx with the following configuration:


<VirtualHost 192.168.0.5>
ServerName "ProFTPD"
MasqueradeAddress 216.xx.xx.xx
PassivePorts 60000 65000
</VirtualHost>

Leave a Comment