Filezilla(客户端)连接的网络安全组

Network Security Group for Filezilla(client) connection

我是新来的

前几天参加了MS azure的活动,今天注册了Azure(免费账号)。
VM环境:VM=CentOS 7,apache+php+mysql+vsftpd+phpMyAdmin

一切正常,运行,可以通过其 public IP 地址访问 "info.php"。
SeLinux = 禁用,Firewalld 禁用。

我的问题是无法通过 Filezilla(PC 客户端)连接此服务器。 来自 Windows 命令提示符 (FTP/put) 正在运行,能够上传文件。 但是通过 Filezilla

Status: Connecting to 5x.1xx.1xx.7x:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/ftpuser"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PORT 192,168,1,183,234,99
Response:   200 PORT command successful. Consider using PASV.
Command:    LIST
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing
Status: Disconnected from server
Status: Connecting to 5x.1xx.1xx.7x:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/ftpuser"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PORT 192,168,1,183,234,137
Response:   200 PORT command successful. Consider using PASV.
Command:    LIST
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

我相信是因为网络安全组设置了出入站规则,需要开放一些端口,但不确定,因为我试过打开1024-65535都允许,还是不行。

如果您使用被动模式FTP,您应该在 Azure NSG(入站规则)上打开端口 20,21 和您需要的端口。你可以查看 /etc/vsftpd.conf

pasv_enable=YES
pasv_min_port=60001
pasv_max_port=60005

对于此示例,您应该在 Azure NSG(入站规则)上打开端口 60001-60005。