Detect IP

  • Thread starter Thread starter RF
  • Start date Start date
Hi,

I don't work an ISP. I'm trying to write a method in .NET to detect the ip
of a NAT and detect if a NAT exists.

Thanks,
RF
 
Hi

I had the same problem. The only way i have found was:

Create a new WebRequest and request e.g. this page:
http://checkip.dyndns.org
then parse out your ip address from the reply.

This gives you your official internet adress if you are
behind a NAT-router at home.

There are more of this "my ip"-pages. Just google "my ip".
It is also recommended that you have multiple pages if one
failes. When you get a timeout at dyndns , request another
my-ip page.

Or if your router has a admin-webpage, request the
status-page and parse your ip from that page.

Greetings
Michael
 
Back
Top