Subject: [BEHAVE] Try EPSV or PASV first

From: Iljitsch van Beijnum <[email-masked]>
Date: Wed, 16 Sep 2009 18:20:07 +0200

Dan,

Any chance of running another test case on the set of FTP servers again?

It looks like at least some FTP servers respond with the remote (from  
the server's persective) IP address to the STAT command.  
Unfortunately, not the Microsoft FTP server.

So if the server mentions an IPv4 address in its login banner or in  
response to STAT, do PASV. If it mentions an IPv6 address, do EPSV.

Server administrators could then simply put an IP address in the  
banner to trigger the desired behavior.

Another hint could be the structure of the IPv6 address: if bits 64 -  
95 are 0:0 or 0:ffff (or whatever else we settle on) that could  
indicate that the destination goes through a translator.

But I would really like to be at least somewhat conservative here and  
not break regular IPv6 operation just so we can talk to a handful of  
broken IPv4 servers a bit faster.