Hello to our File Transfer Protocol or FTP and FTP Port explains in an easy to follow text, include information about FTP client and FTP Server.
File Transfer Protocol (FTP) is among the most popular ways of exchanging data from one computer to another over the internet. It is a standard communication protocol and is made secure with SSL or SFTP.
Requirements for using FTP
Here are the requirements for using FTP. Firstly an FTP client is installed on your computer. Then there’s some info about the FTP server you need to be aware of, such as an FTP server address. It looks similar to the address one type for websites. It can also be a numeric address. Then there is the username and the password. You can also connect to the FTP servers anonymously, where you don’t need a username or password.
So when you want to transfer files, all you need to do is provide the client software with info such as server address, username, and password. Once the connection establishes, you can use the file manager to make changes to the files, including downloading and uploading them. It’s not complicated at all once you start using it. It feels more like working on explorer.
When it comes to the internet, most of us perceive it as a place where one can surf different websites and be up-to-date with the latest trends and news.
Internet is one thing that is exponentially growing every day, with more and more content posted on it. But what else happens on the internet? Well, if you have used the internet for long enough, then you’d know about downloading files, music, movies, and so on. All these activities that happen there have one protocol in common. That is the File Transfer Protocol.
You must know that FTP also observes the model of the client. And unlike the commonly known HTTP, no program can claim relating to FTP. There is a massive selection of servers and clients out there for FTP.
FTP doesn’t use UDP for transportation. It is also worth noting that it uses ports of two kinds for accomplishing its tasks.
FTP port 20 is there for transferring data, while FTP port 21 listens to the commands. But it’s not always necessary for data to be sent by port 21 as it can happen with any other port as well. To understand this better, one must know that there are two different FTP modes- active and passive.
How does active and passive FTP work?
Firstly the FTP client connects with the FTP server on port 21. Since Port 21 is listening for commands, it will respond in such. During this point, the FTP client begins listening to ephemeral port +1 and sends the command (Port N+1) to the server on its port 21. Once done, port 20 of the FTP server would start a connection to the FTP client’s ephemeral port. That’s how the client and the servers conduct the FTP session. The FTP server is capable of supporting both active as well as passive connections.
When it comes to an active FTP connection, the FTP client opens up a port, and the server connects to it actively. While in the passive one, the server opens while listening passively, and the client makes a connection. The majority of the FTP clients select a passive mode because of the preferred safety measures. Also, the firewalls usually block the connections initiated from outside. So, when you use passive mode, the FTP client reaches out to the server to establish a connection. The firewall allows these outgoing connections, and no special arrangements or adjustments to the firewall are needed.
Why is mode is better?
It is not just one answer to tell if active is better or passive is better. To understand it better, one must know the working of both.
While making a connection to the FTP server with active mode, one must set up a firewall accepting the connections to the port that the FTP client is supposed to open. But a lot of ISP (Internet service providers) block those incoming connections. Port 20 is used by active FTP as the data port.
It’s a good idea to use a passive mode because most of the FTP servers are known for supporting the passive mode. For it to work, the FTP server administrator should set the firewall to accept connections to ports that the FTP server might open up. But this is the problem of the server administrator. So, you can just create and use the FTP connections. And once the client opens an internet connection, it starts the communication process with the FTP server.
How is SFTP different from FTP?
SFTP (Secure File Transfer Protocol) allows for data transfer over a connection that has been secured using SSH protocol. The difference between FTP and SFTP is that SFTP is not text-based but packet-based. SFTP is faster as it sends fewer data. Also, one more difference to note here is that in SFTP, the transfer of files is done over the control connection. This eliminates the need for separate data connections. This comes with several benefits. By re-using the main connection, there aren’t any other connections opened between the server and the clients. This results in a secure and efficient connection.
And since SFTP runs with SSH, it is secure than FTP. This comes as an advantage as one cannot turn off the encryptions like that in FTP. This is great for those trying to enforce security policies. One can also see the difference where SFTP server clients can deliver a detailed set of data that is not available to FTP, including permissions, time, date, size, etc. All this sets FTP and SFTP apart from one another.
Now that you know about FTP ports and FTP types, including active and passive ones, you are ready to take file transfer protocol with much comfort, whether it is renaming, deleting, downloading, uploading, or overwriting on files. There’s a lot more you can read and research about the FTP out there.