I have a internet connection with live ip. I have forwarded routers port 21 to my local server, where I have installed FileZilla FTP server. It works fine in local environment, but when I try to access it with my public IP it returns error: 421 Login incorrect. It`s not showing the username/password popup, but directly prompts the error message.
Note:
- I can access my router with my public IP.
- I also have double checked whether my port is forwarded or not with this link.
What should I do next?
32 Answers
It can be that your server is set for PASV FTP mode, if true then you need to open the range of posts in your router selected in the server for passive mode.
PASV FTP mode starts by initiating a connection on port 21 of the server and then the client will ask the server for another designated port to use, if that port is not open in your router then the connection will fail.
That can explain why you do not get a username:password prompt and it fails automatically.
You will see this error message if the 'home directory' you defined in the servers FTP Accounts section is literally deleted from the server.
For example, you have a user called 'steve', and his home directory is '/public_html/steve'... if that folder is deleted, you will get a 421 error, even if the user's FTP account is still present in the list of accounts.
However this is a "421 Home Directory Not Available" error - but I'm putting this here for anyone else. It's also possible your FTP client is misdiagnosing the 421 error code.