Code Snippets

This CSharp (C#) code snippet shows how to get the external IP address (IPv4) of a machine (i.e. dialup connection IP). To achieve this we get all ip addresses of the machine and compare them against the local address ranges (10.0.0.0/24, 172.16.0.0/16, 192.168.0.0/16 and 169.254.0.0/16).

Page 3 of 3
This website is making use of cookies for website analysis. Data is collected anonymously and solely for the purpose of improving the website. Do you agree to the use of cross-session cookies?