Valhalla Legends Forums Archive | C/C++ Programming | help finding real ip

AuthorMessageTime
tenbytes
How do I go about finding my  real ip address and not the ip of the computer on my network?
October 19, 2004, 5:13 AM
LW-Falcon
www.whatismyip.com
October 19, 2004, 5:36 AM
tenbytes
is there anything else that i don't have to parse?
October 19, 2004, 5:56 AM
Yoni
Good question - unfortunately the answer is no. :(

There's no way to find out your external IP without consulting an external third party.
October 19, 2004, 6:32 AM
Mephisto
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.
October 19, 2004, 2:23 PM
Adron
[quote author=Yoni link=topic=9230.msg85165#msg85165 date=1098167575]
Good question - unfortunately the answer is no. :(

There's no way to find out your external IP without consulting an external third party.
[/quote]

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?
October 19, 2004, 9:36 PM
CrAzY
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.  :)
November 4, 2004, 8:56 PM
Newby
[quote author=CrAzY link=topic=9230.msg87368#msg87368 date=1099601811]
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]
I'm assuming he means via code.
November 4, 2004, 11:17 PM
UserLoser.
[quote author=Newby link=topic=9230.msg87393#msg87393 date=1099610230]
I'm assuming he means via code.
[/quote]

Write some sort of bot that logs into your router and manages it's way from there? :P
November 4, 2004, 11:56 PM
St0rm.iD
upnp
November 6, 2004, 5:26 AM
R.a.B.B.i.T
[quote author=Yoni link=topic=9230.msg85165#msg85165 date=1098167575]
Good question - unfortunately the answer is no. :(

There's no way to find out your external IP without consulting an external third party.
[/quote]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?
November 6, 2004, 4:30 PM
Skywing
[quote author=R.a.B.B.i.T link=topic=9230.msg87636#msg87636 date=1099758609]
[quote author=Yoni link=topic=9230.msg85165#msg85165 date=1098167575]
Good question - unfortunately the answer is no. :(

There's no way to find out your external IP without consulting an external third party.
[/quote]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]
That wouldn't give you the external address if you're behind a NAT.
November 6, 2004, 4:51 PM
Arta
Perhaps query network settings to get the IP of the default gateway?
November 6, 2004, 5:35 PM
Adron
[quote author=R.a.B.B.i.T link=topic=9230.msg87636#msg87636 date=1099758609]
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]

What would you connect to? If you connect to 127.0.0.1, that's the IP you'll get back...
November 10, 2004, 5:40 PM

Search