How do I go about finding my real ip address and not the ip of the computer on my network?
www.whatismyip.com
is there anything else that i don't have to parse?
Good question - unfortunately the answer is no. :(
There's no way to find out your external IP without consulting an external third party.
You could always write a simple ASP.NET or PHP script that will record your IP and print it to a simple HTML page. It's not really a conventional way to do things, or simple/easy rather, but it's an option if you don't want to go to another Website you don't know too much about, and rather just go to yours.
Quote from: Yoni on October 19, 2004, 01:32 AM
Good question - unfortunately the answer is no. :(
There's no way to find out your external IP without consulting an external third party.
Now, what are the ways of finding this out? Perhaps sending a somehow bad packet out and looking at the icmp reply? You should be able to dig your own IP out of the returned part there?
I'm guessing your on a router, Log into your router and you should be able to find it some where on there. But it is much easier to just type "what is my IP" on google. :)
Quote from: CrAzY on November 04, 2004, 02:56 PM
I'm guessing your on a router, Log into your router and you should be able to find it some where on there. But it is much easier to just type "what is my IP" on google. :)
I'm assuming he means via code.
Quote from: Newby on November 04, 2004, 05:17 PM
I'm assuming he means via code.
Write some sort of bot that logs into your router and manages it's way from there? :P
upnp
Quote from: Yoni on October 19, 2004, 01:32 AM
Good question - unfortunately the answer is no. :(
There's no way to find out your external IP without consulting an external third party.
Couldn't you create 2 sockets and bind one, then have the other connect to the first, then grab the remote IP, or would that just return 127.0.0.1?
Quote from: R.a.B.B.i.T on November 06, 2004, 10:30 AM
Quote from: Yoni on October 19, 2004, 01:32 AM
Good question - unfortunately the answer is no. :(
There's no way to find out your external IP without consulting an external third party.
Couldn't you create 2 sockets and bind one, then have the other connect to the first, then grab the remote IP, or would that just return 127.0.0.1?
That wouldn't give you the external address if you're behind a NAT.
Perhaps query network settings to get the IP of the default gateway?
Quote from: R.a.B.B.i.T on November 06, 2004, 10:30 AM
Couldn't you create 2 sockets and bind one, then have the other connect to the first, then grab the remote IP, or would that just return 127.0.0.1?
What would you connect to? If you connect to 127.0.0.1, that's the IP you'll get back...