打开Active FTP连接从Azure的VM [英] Open Active FTP Connection From Azure VM

查看:268
本文介绍了打开Active FTP连接从Azure的VM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用从Azure的VM活动连接连接到远程FTP服务器。我得到的错误是

I'm attempting to connect to a remote FTP server with an Active connection from an Azure VM. The error I'm getting is

非法PORT命令。

我在使用被动连接连接到其他FTP站点没有问题,但这个FTP服务器只支持活动。我的问题是基本相同的this问题,除了我的问题不是由Windows防火墙引起的。我通过转动防火墙关闭几秒钟,并重新尝试的连接,没有运气验证这一点。

I have no issues connecting to other FTP sites using Passive connections, but this FTP server only supports Active. My question is basically the same as this question, except that my issue is NOT caused by the Windows Firewall. I verified this by turning the firewall off for a few seconds and re-attempting the connection, with no luck.

我的理论是,这事做与Azure的端点,虽然我不能确认,我不知道我怎么会设置它们允许这一点。

My theory is that this has something to do with the Azure "Endpoints", though I can't verify that and I don't know how I would set them up to allow this.

任何想法?

推荐答案

是的,看起来像一个丢失的端点(+入站规则,如果你想有防火墙启用)。
在主动模式服务器连接回客户端特定端口上(由客户端通过,PORT命令) - 较长的解释

Yes, that looks like a missing endpoint (+ inbound rule if you want to have firewall enabled). In active mode server is connecting back to the client on specific port (passed by the client, PORT command) - longer explanation

为了在Azure上使用主动模式,你必须:

In order to use active mode on azure you have to:


  1. 限制你的FTP客户端使用特定端口(或范围)和公共IP(这是在VM上的墙纸)
    例如FileZilla的:
    每个客户端应该有这样的某处选择。除非你运气不好,并使用<一个href=\"https://social.msdn.microsoft.com/forums/en-US/bc1e643a-75b4-4176-98c9-16d75daf6764/ftpwebrequest-specify-a-data-port-to-use\"相对=nofollow> .NET框架的FtpWebRequest 。

添加端点中的端点设置您的Azure虚拟机:
有没有办法添加端口范围中点击你要添加的每个端口一个接一个(很烦人)

Add endpoint with the same port (or range) in Endpoint settings of your Azure VM: There is no way to add port range in one click you have to add every port one by one (quite annoying)

就是这样。您可以运行FileZilla的网络连接向导,以验证这些设置,你应该看到这样的事情:

And that's it. You can run FileZilla "Network connection wizard" to verify those settings and you should see something like this:

Connecting to probe.filezilla-project.org
Response: 220 FZ router and firewall tester ready
USER FileZilla
Response: 331 Give any password.
PASS 3.9.0.6
Response: 230 logged on.
Checking for correct external IP address
IP 23.102.xx.xxx cd-bac-dd-bcg
Response: 200 OK
PREP 6000
Response: 200 Using port 6000, data token 1941533557
PORT 23,102,xx,xxx,23,112
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 200 Successful
QUIT
Response: 200 goodbye!

这篇关于打开Active FTP连接从Azure的VM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆