一天一個這樣的問題?
port mode即主動模式;
pass mode為被動模式:
PS: 都是英文的...別踹我=.=a
PORT and PASV modes explained.
In a nutshell...
PASV : client connects to server for data transfer
PORT : server connects to client for data transfer
An FTP Server uses 2 ports :
- main port (usually 21) for command (USER, PASS, CWD ...)
- data port (main port - 1) for data transfer (directory listing, upload & download)
The difference between Passive mode (PASV) and normal mode (PORT) is the connection :
- when using PASV, client asks server where it (the client) will have to connect to to establish data transfer link.
Client > PASV
Server > 227 Entering Passive Mode (209,15,39,184,249,155)
FTP client must connect to 209.15.39.184 on port 249*256 + 155 = 63899
- when using PORT, client specifies what ip and port the FTP server must connect to to establish data transfer link :
Client > PORT 192,168,0,10,5,114
Server > 200 PORT command successful.
This time, it is the FTP server which connects to the FTP client (ip = 192.168.0.10 on port 5*256+114 = 1394)
Software, Ports and Modes Supported
Server Port PASVPORT
BPFTP 21yes yes
BPFTP Non-Std no yes
Serv-U 21yes yes
Serv-U Non-Std no yes
GuildFTPd 21yes yes
GuildFTPd Non-Std no yes
IIS FTP21no yes
IIS FTPNon-Std no yes
ProFTPD21yes(static ip only) yes
ProFTPDNon-Std no yes