# VBForums CodeBank > CodeBank - C# >  Simple function to get external IP-adress

## Lightning

Hi all,

I've got a simple and reliable methode to get the external IP address of a device:


```
        public static IPAddress GetExternalIP()
        {
            using (var wc = new WebClient())
            {
                return IPAddress.Parse(wc.DownloadString("http://tools.feron.it/php/ip.php"));
            }
        }
```

This service is hosted on my domain and I will keep it ferever, free and advertisment free, since it are just 3 lines of PHP.
Have fun with it.

----------

