我在AWS上运行一个服务器,并且连接到一个合作伙伴的FTP站点(不太了解它们运行的是什么)。 我的服务器有一个弹性的IP。 在下面的结果xx.xx.xx.xx是内部IP(与我从IPConfig获得相同)。 yy.yy.yy.yy是外部IP(与我RDP进入的一样)。
Connected to ftp.site.com. 220---------- Welcome to Pure-FTPd [privsep] ---------- 220-You are user number 1 of 50 allowed. 220-Local time is now 22:47. Server port: 21. 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 15 minutes of inactivity. User (ftp.site.com:(none)): someuser 331 User someuser OK. Password required Password: 230 OK. Current restricted directory is / ftp> literal pasv 227 Entering Passive Mode (69,28,68,87,255,170) ftp> ls 500 I won't open a connection to xx.xx.xx.xx (only to yy.yy.yy.yy)
我尝试了PASV模式,但它不工作。
除了RDP,我的安全组没有任何开放。
Windows防火墙也在服务器上运行,看起来像是Amazon的默认configuration。
一旦我得到这个连接工作,我可能会从一个SSIS包到他们的服务器,FWIW的FTP数据。
我知道通过NAT这样的FTP是古怪的,连接打开回来。 我需要做什么?
Windows内置的命令行FTP客户端根本不支持被动模式。 那些你在互联网上发现的有关literal pasv或quote pasv黑客实际上并没有做任何事情,就FTP客户端而言; 他们告诉服务器进入被动模式,但客户端仍然不知情。 您需要获得第三方FTP客户端。
麻烦的是,你的pasv命令是告诉服务器连接到内部IP。 不是你的外部IP。 这不会有两个原因。