Home All Groups Group Topic Archive Search About

FtpWebRequest EnableSSL behind NAT

Author
25 Jan 2006 8:15 PM
nickname
Is it possible to use the FtpWebRequest class to download a file from an
external FTP server that uses SSL if the computer is behind a NAT firewall?

I have read to get ftp SSL to work behind NAT you need to forward a range of
ports and specify those ports on your FTP client. I cannot find where to
specify these in this class?

Author
26 Jan 2006 7:27 AM
Luke Zhang [MSFT]
Hello,

FtpWebRequest  can connect to the server with SSL. you may refer to
following articles:

http://blogs.msdn.com/adarshk/archive/2004/09/13/229069.aspx
http://msdn2.microsoft.com/en-us/library/system.net.ftpwebrequest.enablessl.
aspx

As for NAT, you must use PASV transfers (FtpWebRequest.Passive= True)
instead of PORT transfers (Passive = False) because a NAT can not translate
the IP address given in a PORT command on the control connection.

Hope this help,

Luke

AddThis Social Bookmark Button