FtpWebRequest works with explicit TLS / SSL

I am trying to transfer a file through explicit TLS / SSL.

It seems that FtpWebRequest in .NET prior to 3.5 did not work with either UsePassive or with. If it is disabled, I think that working with a firewall / router requires (for active mode) that, after deploying the application on the client computer, I have no control and most likely will not work right away.

But if I disabled UserPassive, it will throw out "The server returned the address in response to the PASV command, which is different from the address to which the FTP connection was created." and according to this topic:

The server returned the address in response to a PASV command, which is different from the address to which the FTP connection was established and

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=97409&wa=wsignin1.0 still does not work.

By the way, if I know for sure the public IP and the internal IP address, is there a way to accept the new internal IP address, so will it at least work? The first link will make it work, but I do not understand why and how he did it? What is myProxyServerIP? Should I have a proxy server?

The strange thing is, even though my application could not upload a file or a list of directories, although ftp, but it will successfully delete the file on the server and give a success code? My guess is that my application can only transmit / transmit the control / command code to the ftp server, but there are problems with receiving data, although there are other ports from the server?

+3
1

, :

, , ?

FTP . ( ) - , login, delete, make directory .. 21.

FTP , ( ). FTP- , . , . - , , . , .

PASV, , FTP

FTP- :

client: PASV
(i would like to transfer files. Tell me which port and ip address should I use)

server: 227 Entering Passive Mode (172,16,3,4,204,173)
(ok, use port 52397 on IP address 172.16.3.4.)

client: connects to this IP address/port and starts data transfer.

FTP- IP-. FTP-, IP- (, 1.2.3.4) (192.168.2.3).

FTP-, IP- (1.2.3.4) , IP- (192.168.2.3). , NATed.

.

FTP- FTP- . , . , ( ).

IP- PASV

IP- ftp , IP-, PASV, (, 10., 192.168.). FTP- IP-.

Rebex FTP . ( ). , FtpWebRequest.

, .

+3

Source: https://habr.com/ru/post/1762976/


All Articles