1

I have an FTP server setup on a custom port rather than port 21. Now I'm able to connect to it remotely using an IP and the new port set using FileZilla, which is set to passive mode. Everything works as expected in FileZilla, but when I try using the same credentials in Microsoft Visual Studio Community 2015, I get this error

Unable to retrieve folder information from the server. FTP Passive mode is not available.

If I turn the passive mode off, I get this error:

Unable to retrieve folder information from the server. Illegal PORT command (500).

My goal in all this is to quickly modify and upload the files on the server I change without having to go through FileZilla. The reason VS specific is for C++ development environment. Potentially I'm setting it up incorrect, but I've looked online and I've done File>Website and added the credentials there. Tried completed disabling my firewall, no luck. I know the port is good otherwise I wouldn't be able to connect via FileZilla. Just running out of ideas what to do as it works in one case but not the other. Any help is very much appreciated.

FileZilla log:

Status: Connecting to XXX.XXX.XXX.XXX:XXX...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Status: Directory listing of "/home/<USER>" successful
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
William McCarty
  • 769
  • 3
  • 12
  • 26
  • 1
    Show us your code! Show us a [log file](http://stackoverflow.com/q/9664650/850848)! Show us a FileZilla log file! Anything! – Martin Prikryl Feb 06 '17 at 09:29
  • What is there to show??? I posted the errors I'm getting by simply attempting to connect in visual studios ftp. – William McCarty Feb 06 '17 at 16:54
  • Sorry, I've misunderstood the question. Anyway, FileZilla log file would be useful anyway. If you have an access to server-side log, post that too (for both FileZilla and VS session). Or packet capture. – Martin Prikryl Feb 06 '17 at 17:23
  • Mon Feb 6 09:35:47 2017 [pid 8571] CONNECT: Client "::ffff:XXX.XXX.XX.XX" Mon Feb 6 09:35:47 2017 [pid 8569] [] OK LOGIN: Client "::ffff:XXX.XX.$ – William McCarty Feb 06 '17 at 17:59
  • got that in the logs on the server – William McCarty Feb 06 '17 at 17:59
  • Filezilla: Status: Connecting to XXX.XXX.XXX.XXX:XXX... Status: Connection established, waiting for welcome message... Status: Insecure server, it does not support FTP over TLS. Status: Server does not support non-ASCII characters. Status: Logged in Status: Retrieving directory listing... Status: Server sent passive reply with unroutable address. Using server address instead. Status: Directory listing of "/home/" successful – William McCarty Feb 06 '17 at 18:03
  • Filezilla connects and opens up fine, VS is the issue where it displays the errors i posted. trying to find the actual logs for VS attempts, but if you know what logs you need for VS please let me know. – William McCarty Feb 06 '17 at 18:14
  • Can you please add an **exact** VS error message to your question, so that others will be able to google this question for hep? – Martin Prikryl Feb 06 '17 at 22:13
  • added errors to main post as well – William McCarty Feb 07 '17 at 00:41
  • Thanks + Did my answer help? – Martin Prikryl Feb 07 '17 at 06:15

1 Answers1

1

Server sent passive reply with unroutable address

That means your server is misconfigured. It does not know it's external IP address. It reports local (as of the server) IP address to the client in the response to the PASV command. The client obviously cannot connect to that address to start a data transfer.

See my article on network configuration for FTP passive mode for details.

FileZilla, when receiving an unroutable IP address, uses the IP address of the FTP server for the data transfer. But that's just heuristics, that does not have any backing in the FTP specification. I assume that the Visual Studio (as all Microsoft implementations of FTP protocol do) strictly adheres to the FTP specification. It does not do anything "smart" like FileZilla and simply fails (what is actually the "correct" behavior).

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992