使用FileZilla搭建了FTP服务端,使用本地ip(127.0.0.1:21)可以访问:
(000074)2023/9/6 星期三 20:52:07 - (not logged in) (127.0.0.1)> Connected on port 21, sending welcome message
(000074)2023/9/6 星期三 20:52:07 - (not logged in) (127.0.0.1)> AUTH TLS
(000074)2023/9/6 星期三 20:52:07 - (not logged in) (127.0.0.1)> 234 Using authentication type TLS
(000074)2023/9/6 星期三 20:52:07 - (not logged in) (127.0.0.1)> TLS connection established
(000074)2023/9/6 星期三 20:52:08 - (not logged in) (127.0.0.1)> USER blog
(000074)2023/9/6 星期三 20:52:08 - (not logged in) (127.0.0.1)> 331 Password required for blog
(000074)2023/9/6 星期三 20:52:08 - (not logged in) (127.0.0.1)> PASS
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 230 Logged on
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> PBSZ 0
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 200 PBSZ=0
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> PROT P
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 200 Protection level set to P
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> PWD
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 257 "/" is current directory.
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> TYPE I
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 200 Type set to I
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> PORT 127,0,0,1,192,215
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 200 Port command successful
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> MLSD
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 150 Opening data channel for directory listing of "/"
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> TLS connection for data connection established
(000074)2023/9/6 星期三 20:52:08 - blog (127.0.0.1)> 226 Successfully transferred "/"
后来做了端口映射,使用外网访问就报错:
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> Connected on port 21, sending welcome message
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> AUTH TLS
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> 234 Using authentication type TLS
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> TLS connection established
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> USER blog
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> 331 Password required for blog
(000075)2023/9/6 星期三 20:58:59 - (not logged in) (127.0.0.1)> PASS
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> 230 Logged on
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> PBSZ 0
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> 200 PBSZ=0
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> PROT P
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> 200 Protection level set to P
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> PWD
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> 257 "/" is current directory.
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> TYPE I
(000075)2023/9/6 星期三 20:58:59 - blog (127.0.0.1)> 200 Type set to I
(000075)2023/9/6 星期三 20:59:00 - blog (127.0.0.1)> PORT 121,225,233,75,193,139
(000075)2023/9/6 星期三 20:59:00 - blog (127.0.0.1)> 421 Rejected command, requested IP address does not match control connection IP.
(000075)2023/9/6 星期三 20:59:00 - blog (127.0.0.1)> PASV
(000075)2023/9/6 星期三 20:59:00 - blog (127.0.0.1)> 227 Entering Passive Mode (127,0,0,1,0,121)
(000075)2023/9/6 星期三 20:59:00 - blog (127.0.0.1)> MLSD
(000075)2023/9/6 星期三 20:59:11 - blog (127.0.0.1)> 425 Can't open data connection for transfer of "/"
因为两种连接的参数一致,客户端的配置应该不会有问题;服务端上的端口目前设置如下:
同时已经在入站/出站规则中打开了对应端口,不知道还有什么地方需要配置