Forum » Omrežja in internet » Razlika med aktivnim in pasivnim načinom delovanja FTP
Razlika med aktivnim in pasivnim načinom delovanja FTP
Karlos ::
Bi znal kdo na preprost način razložiti razliko med aktivnim in pasivnim načinom delovanja FTP?
Sai Baba: "Dam vam to, kar hočete, da boste hoteli to, kar vam želim dati."
black ice ::
In active mode, the FTP client opens a dynamic port, sends the FTP server the dynamic port number on which it is listening over the control stream and waits for a connection from the FTP server. When the FTP server initiates the data connection to the FTP client it binds the source port to port 20 on the FTP server.
In order to use active mode, the client sends a PORT command, with the IP and port as argument. The format for the IP and port is "h1,h2,h3,h4,p1,p2". Each field is a decimal representation of 8 bits of the host IP, followed by the chosen data port. For example, a client with an IP of 192.168.0.1, listening on port 49154 for the data connection will send the command "PORT 192,168,0,1,192,2". The port fields should be interpreted as p1×256 + p2 = port, or, in this example, 192×256 + 2 = 49154.
In passive mode, the FTP server opens a dynamic port, sends the FTP client the server's IP address to connect to and the port on which it is listening (a 16-bit value broken into a high and low byte, as explained before) over the control stream and waits for a connection from the FTP client. In this case the FTP client binds the source port of the connection to a dynamic port.
To use passive mode, the client sends the PASV command to which the server would reply with something similar to "227 Entering Passive Mode (127,0,0,1,192,52)". The syntax of the IP address and port are the same as for the argument to the PORT command.
In extended passive mode, the FTP server operates exactly the same as passive mode, however it only transmits the port number (not broken into high and low bytes) and the client is to assume that it connects to the same IP address that was originally connected to. Extended passive mode was added by RFC 2428 in September 1998.
BigWhale ::
Po domace povedano, v aktivne nacinu se streznik povezuje nazaj na klienta v pasivnem pa ne.
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | FILEZILLA -- Drug port!?Oddelek: Programska oprema | 939 (828) | misek |
» | ProtFtp Passive mode in iptablesOddelek: Programska oprema | 2253 (2075) | SasoS |
» | Postaviti FTPOddelek: Pomoč in nasveti | 1959 (1852) | miller31 |
» | FTP Server (Cerberus) za routerjem Linksys WRT54GCOddelek: Programska oprema | 2052 (1789) | sasok |
» | VsftpOddelek: Operacijski sistemi | 1328 (1235) | trnvpeti |