There's no way to know from the inside, unless your router has some sort of
API (very unlikely) or has SNMP available. If it has SNMP information
available, you may be able to find out, but SNMP is a big can of worms.
There are sites, such as
www.whatismyip.com which, assuming you're using NAT
inside the router, will tell you what the routers IP address is, so you
could get the page and parse the IP address out of it.
Other than those options, I'm not sure what else you could do.
Iker Llanos said:
I have a router plugged to my pc. I would like to know if there is a way
of knowing the WAN side ip through C# code. What I want to do is being
alerted about changes of my router WAN side ip.