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

时间:2017-05-09 09:18:20

标签: azure azure-virtual-machine filezilla

我是新来的。

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

一切都已启动并运行,能够通过其公共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所有允许,仍然无法正常工作。

1 个答案:

答案 0 :(得分:0)

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

pasv_enable=YES
pasv_min_port=60001
pasv_max_port=60005

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