foreach (IPAddress ip in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
     Console.WriteLine(ip.ToString());