What Is an FTP Port?

Home » Knowledge Base » Hosting Basics » What Is an FTP Port?

One unique characteristic of FTP (File Transfer Protocol) is that it uses two ports in order to facilitate the communication between the client and the server. FTP Port 20 is used to transfer data while FTP Port 21 is used by the server to listen for commands from the client. It’s also true that transferring data over FTP Port 20 is not mandatory and it can be done through another port as long as this other port has been negotiated between the two parties.

FTP has two modes of operation – active and passive. Both are started by the FTP client and then acted upon by the FTP server. Here at AwardSpace, we mainly support Passive FTP, however, we will briefly examine both modes of operation below:

 

Active FTP

Inactive mode the FTP client connects from a random unprivileged port (N, which is usually 20) to the FTP server’s command FTP port, which is port 21. Then, the client starts listening to port N+1 and sends a command to the FTP server. After that, the server connects back to the client’s specified data port from its local one. From the server-side firewall’s point of view, to support FTP in active mode these ports have to be opened: FTP server’s port 21 from anywhere (Client initiates connection); FTP server’s port 21 to ports > 1023 (Server responds to client’s control port); FTP server’s port 20 to ports > 1023 (Server initiates data connection to client’s data port); FTP server’s port 20 from ports > 1023 (Client sends ACKs to server’s data port).

 

Passive FTP

In this mode, the FTP client initiates two connections to the FTP server. We need to keep in mind as well that both of these connections are using ephemeral ports themselves, and that’s ok. By opening two connections, or sockets with the FTP server, the client is able to resolve the issue of its firewall denying access to the FTP server and initiating contact on one of the client’s high ephemeral ports. One of the connections opened by the client will contact the server on FTP port 21, and issue it the PASV (passive) command, vice the normal PORT command when using active FTP. Now what happens is that the FTP server opens an ephemeral port and issues the PORT command to the FTP client. With this in hand, the client then starts a connection back to the server FTP port for the data transfer.

Was this post helpful?

i

Relevant tags:

Connect

Latest posts:

How to Check If SELinux Is Enabled in MediaWiki

Although installing MediaWiki and logging in to the platform is a simple task, setting up the CMS can be challenging at times, especially when the process involves server configurations. A critical aspect of web server security is the so-called Security-Enhanced Linux...

How to View and Manage Recent Images in MediaWiki

MediaWiki offers numerous versatile tools that help you manage and display recent images on your wiki pages. This guide showcases how to view and manage recent images in MediaWiki, so you can make it easier for logged-in users and admins to organise image content on...

How to Enable and Customize User Glow in MediaWiki

Now that you have installed MediaWiki and logged in to the admin panel, and you also learned how to add modules, it is time to make your wiki a bit more engaging and user-friendly. There are numerous ways to customize your Wiki project and one handy approach is to add...

How to Find Modules in MediaWiki

After you install MediaWiki, log in to the CMS, and presumably install extensions, it is time to learn how to find modules in MediaWiki.   What are MediaWiki Modules Modules in MediaWiki are Lua-based scripts that allow you to add various functionalities to your...

How to Fix MediaWiki Internal Error: A Step-By-Step Guide

MediaWiki Internal Error message can be very frustrating and can significantly harm your MediaWiki project. Luckily, the issue can be fixed in a few easy-to-follow steps to get your website up and running in no time. There are various causes for the issue: Incorrect...



Create a website for free!


Free forever

Our Support Team is Here to Help

 

If you need any questions answered, don't hesitate and contact us. Click the button below and follow the instructions. You can expect an answer within an hour.

 

Contact AwardSpace

 

iNewest knowledge base articles

How to Check If SELinux Is Enabled in MediaWiki

Although installing MediaWiki and logging in to the platform is a simple task, setting up the CMS can be challenging at times, especially when the process involves server configurations. A critical aspect of web server security is the so-called Security-Enhanced Linux...

How to View and Manage Recent Images in MediaWiki

MediaWiki offers numerous versatile tools that help you manage and display recent images on your wiki pages. This guide showcases how to view and manage recent images in MediaWiki, so you can make it easier for logged-in users and admins to organise image content on...

How to Enable and Customize User Glow in MediaWiki

Now that you have installed MediaWiki and logged in to the admin panel, and you also learned how to add modules, it is time to make your wiki a bit more engaging and user-friendly. There are numerous ways to customize your Wiki project and one handy approach is to add...

How to Find Modules in MediaWiki

After you install MediaWiki, log in to the CMS, and presumably install extensions, it is time to learn how to find modules in MediaWiki.   What are MediaWiki Modules Modules in MediaWiki are Lua-based scripts that allow you to add various functionalities to your...

How to Fix MediaWiki Internal Error: A Step-By-Step Guide

MediaWiki Internal Error message can be very frustrating and can significantly harm your MediaWiki project. Luckily, the issue can be fixed in a few easy-to-follow steps to get your website up and running in no time. There are various causes for the issue: Incorrect...

How to Add Infobox Module in MediaWiki

The Infobox in MediaWiki is a handy tool for presenting content and key information in a structured and visually pleasing way. Infoboxes are useful for any kind of MediaWiki project and can provide your readers with a quick snapshot of important data and details. In...

Even more web tutorials

Check out our web hosting knowledge base and the WordPress tutorials to learn more, and be better prepared for your website creation and maintenance journey.