Ftp passive mode. Cant login. Entering Passive Mode

Greetings,

If you are not able to login to your ftp account with correct password and if it hangs messaging Entering Passive Mode with your local machince Ip or server IP:Random_port_no then you can try this.

Open the port range from 30000 to 50000. See the range that you are getting in your error. Open the port range according to the error that you get.

iptables -A INPUT -p tcp –dport 30000:50000 -j ACCEPT

/etc/init.d/iptables save

/etc/init.d/iptables restart.

Go to your ftp configration file. If its pure-ftp then you will have option there

to /etc/pure-ftpd.conf (without the leading #):
PassivePortRange 30000 35000
Then restart pure-ftpd and csf and pass

I am not sure about other ftp software like vsftpd or proftpd.

Else you can stp firewall and try login to ftp that will even solve your problem but its better to use above method rather then stopping firewall cause disabling firewall is insecure way. :)

Cheers..!

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge