1

I have problem about connect ftp with my server ubuntu throw port 21 at google cloud vm. i did install vsftp service my ubuntu, and setup rule allow firewall access port 21 on google cloud ,but still can't connect enter image description here

1 Answer 1

1

Do you have selinux or iptables enabled on your server ?. What are the contents of the vsftpd.log file.

Are you able to telnet to your server on port 21 from your local computer ?

Also you need to open more ports in your firewall for the FTP. Port 21 is used for setting up FTP connection, but the data transfer takes place over other ports depending on whether your FTP server is configured in active mode or passive mode.

In active mode, the data transfer takes place over port 20. Active mode is used when the FTP server can connect to the FTP client from port 20. If the client does not allow incoming connections, then passive mode may be used. In Passive mode, the data transfer takes place over a range of ports which is configured on the FTP server. These ports need to be opened on the server.

If your VSFTP server is using Active mode, then you have to open port 20 on the Google Cloud firewall. If your server is using Passive mode then you need to open the ports that are configured on the server for Passive mode.

Read this link for more information on how FTP works: https://en.wikipedia.org/wiki/File_Transfer_Protocol

Not the answer you're looking for? Browse other questions tagged or ask your own question.