How to configure FTP ports? What are FTP ports?

FTP ports are today a standard option for transferring data through various TCP networks, including the Internet. These protocols are often used to download all kinds of web pages or documents from a private development device to various open hosting servers.

What are they?

ftp ports

FTP ports are entirely built on the client-server architecture and at the same time provide for the use of a wide variety of network connections for broadcasting commands or information between the server and the client. Users who use this protocol option can go through the authentication procedure by passing the password and login in plain text. Or, if the server structure provides for this, they can connect anonymously. Among other things, it is also possible to use the SSH protocol, which ensures absolutely secure data transfer, hiding the password and login, as well as additionally encrypting all the contents.

A bit of history

The first client applications using FTP ports were interactive command-line devices that implement syntax and standard commands. Graphical user interfaces have since been developed for the many operating systems that are used today, and in particular it is worth noting among these interfaces general web design tools such as Microsoft Expression.

FTP ports today are one of the oldest standards, because it appeared in 1971 before TCP / IP and HTTP. At first, it was used exclusively on top of NCP, but today its use is actively distributed to transfer various software, as well as gain access to remote resources.

What are its differences from HTTP?

default ftp port

The default FTP port has a rather striking feature - this is the use of multiple connections. In this case, one channel in this case is used as a control, and through it commands are given to the server, and responses are returned from it. Through the remaining channels, the necessary information is directly transmitted, while one channel is used for each transmission.

It is for this reason, if you use the default FTP port, one session provides for the simultaneous transfer of several files in different directions. Since each channel simply opens its own TCP port, the number of which is manually selected by the client itself or automatically selects a server, depending on which transmission mode is used.

What are the benefits?

port forwarding ftp

Binary mode is the basis of transmission using the FTP protocol. Due to this, ports of this type can significantly reduce traffic overhead , as well as reduce the time required for exchanging information during the transfer of large files. In any case, the HTTP format protocol necessitates the encoding of binary information in text form, which can be done, for example, using the specialized Base64 algorithm.

Using the standard FTP port, the client initially enters the session, and all subsequent operations will already be carried out in it. In other words, the server initially remembers the current state and maintains it at a certain level. At the same time, when using the HTTP protocol, such a memory is not present, since the purpose of this protocol is simply to transfer data, after which it completely forgets about the operation. In this regard, when using the HTTP protocols, the state is memorized by other technologies that are not relevant to this protocol.

How it works?

ftp protocol ports

The FTP protocol operates at the application level of the OSI model and is used to transmit data using TCP / IP. This initially requires an FTP server to start, which will wait for incoming requests. If necessary, the client will be able to independently contact this server using port number 21. It is worth noting the fact that such a connection will remain open during this session. The second connection is opened by the server from port number 20 to the port that the client uses, which is called active mode, or it can be opened directly by the client itself from any convenient port to the port of the corresponding server. This is called passive mode and is required for file transfer.

The use of control flow is carried out to work with a specific session. For example, such flows are actively used in the process of exchanging various passwords or commands between the server and the client, if a protocol like telnet is used. Thus, for example, the “RETR file_name” command will transfer a specific file to the client from the server. Due to the formation of such a two-port structure, FTP is today considered to be an out-of-band protocol, in contrast to HTTP, which remains in-band.

How to setup?

If you do not know how to open the FTP port , you can do this using the FileZilla resource as follows:

  1. Initially launch FileZilla itself.
  2. Now open the "Site Manager", and then in the pop-up window, click the "New Site" button.
  3. On the General tab, enter: Host: the domain you are using; Server type: FTP or FTPES (it is recommended to use the latter one), Login type: "Normal" or "Request a password" (again, the last option is optimal for the reason that your password will not be saved, although you will have to constantly enter him at the entrance); Username: enter your FTP login in this line.
  4. Now go to the “Transmission Settings” item, and then select “Passive” in the “Transmission Mode” section.
  5. At the end, click on the "Connect" button.

Now you have forwarded FTP ports , your connection is configured and saved in the “Site Manager”, and you can use it at your discretion.

Anonymous protocol

standard ftp port

The host that provides the FTP service, if necessary, can provide users with completely anonymous access. In this case, users are initially logged in as anonymous. However, it is worth noting that the system may also be case sensitive on certain servers. Although in the overwhelming majority of cases, users are asked to indicate their email address instead of a password, in reality the system does not conduct any verification, and this step, in fact, is not mandatory.

Most FTP hosts that provide various software updates often prefer to support anonymous access.

NAT-PT protocol

how to open ftp port

Specifically, in order to provide the possibility of using FTP through specialized firewalls, it was decided to use specialized NAT permission, which is also called NAT-PT specialists. Using it, you can easily transfer incoming connections to the client from the server, because in the NAT process it can replace the transmitted information from the client, indicating to the server the correct port and address with which it can connect, and then it starts broadcasting the connection from the server to the client address.

Despite a fairly large number of the most diverse measures and innovations that were taken to provide FTP support, in practice, they prefer to disable the use of the NAT-PT function in various routers or routers in order to provide additional protection against various viruses.

Source: https://habr.com/ru/post/K9107/


All Articles