I cant seem to get or find information on finding my routers public IP? Is this because it cant be done this way and would have to get it from a website?
Or this, it works quite well i think for what i needed. It's from here.
public IPAddress GetExternalIP()
{
WebClient lol = new WebClient();
string str = lol.DownloadString("http://www.ip-adress.com/");
string pattern = "My IP address is: (.+)
"
MatchCollection matches1 = Regex.Matches(str, pattern);
string ip = matches1(0).ToString;
ip = ip.Remove(0, 21);
ip = ip.Replace("
", "");
ip = ip.Replace(" ", "");
return IPAddress.Parse(ip);
}