I have an FTP server where it is returning an invalid IP Address for a PASV command. Filezilla automatically detects this. How do I validate an IP Address in C# to make sure it is routable?
Here is what filezilla has in the log:
Command: PASV
Response: 227 Entering Passive Mode (10,46,169,44,21,124).
Status: Server sent passive reply with unroutable address. Using server address instead.
For checking private addresses(biggest subset of non-routable addresses) you could something like:
there are more non routable addresses (e.g. loopback, multicast, and experimental blocks) but it seems unlikely you would see those.