I'm implementing the PASV
mode in a FTP
server, and I send to the client the IP address and port of the data end point. This is stupid because the IP is actually where the client is already connecting, so there ire two options:
How could I get the public
IP
address from a given instance? Not theVIP
, but the public one.How could I get the original target
IP
address that the user used from aSocket
object? Considering routers and load balancers in the middle :P
An answer to any of this questions would do, although there is another way that could work... may I get the public IP
address doing a DNS
look up of myapp.cloudapp.net
?
A fourth option would be use the Azure Management API library... but, too much trouble :P.
Cheers.