Bitfix! tutorials – IT Solutions

Wat is FTP

1. Wat is FTP

File transfer protocol (FTP) is a network protocol that allows data from one node to send to another network via a (bv. the Internet, the home network). With an FTP server, it is very easy to send files to our hosting providers or rather upload and / or downloaden.FTP is a special service because it uses two ports during a session, een “data” poort en een “command” (ook wel bekend als de”control” ) port. Traditionally these are port 21 for the command port and 20 for the data port. However, the confusion begins to, Depending on the mode, The data port is not always port 20 is.

1.1 FTP types

The FTP protocol has two variants: Passive FTP and Active FTP The difference between the two lies in how a session is established for file. Both require a client / server connection, and both use the underlying Transfer Control Protocol ( TCP ) en het Internet Protocol ( IP ) for the routing , data flow control , error detection and error correction. However, active FTP uses 2 Ports , while passive FTP makes use of only one port .

1.2 Active FTP

With active FTP, the FTP server makes a new connection back to the client to transfer the requested data, when a user connects to a remote FTP server and requests information or a file. This is called the data connection called. To start the FTP client chooses a random (random) poort om de “data connection” te ontvangen. The client sends the port number it chose to the FTP server and then listens for an incoming connection on that port. The FTP server then initiates a connection to the address of the client on the chosen port and transfers the data. This is a problem for users attempting to gain access to FTP servers from behind a NAT gateway. Because of how NAT works, initieert de FTP server de “data connection” door te verbinden naar het externe adres van de NAT gateway op de gekozen poort. The NAT machine will receive this, but because he has no figure for the packet in its state table, he will drop the packet and will not deliver it to the client.

1.3 Passive FTP

In passive mode FTP, vraagt de client aan de server een willekeurige poort te kiezen om op te luisteren voor de “data connection”. The server informs the client of the port it has chosen, and the client connects to this port to transfer the data. Jammer genoeg is dit niet altijd mogelijk of wenselijk omwille van de aanwezigheid van een firewall vóór de FTP server die de binnenkomende “data connection” blokkeert. The most common connection is done via the passive FTP, it is easier for the client to connect more difficult for the admin to manage, This will however need to do some work in the firewall.

Exit mobile version