Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I find my external IP?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
astrodelgato
n00b
n00b


Joined: 01 Jan 2004
Posts: 66
Location: Atlanta, GA

PostPosted: Sun May 01, 2005 3:25 am    Post subject: How can I find my external IP? Reply with quote

Is there a way for a host inside my home network to find the external IP that my router received via dhcp?

What I am hoping to do is to grab this IP and then update my remote server's /etc/hosts file with my correct IP. That way I can maintain some host based authentication on the server. Additionally, it would be great if I only had to update it when my IP changed. I know that some of the dyndns.org software does exactly this.

If anyone knows of a better solution to this problem, I would appreciate it.

-austin
Back to top
View user's profile Send private message
jtaylor72
Apprentice
Apprentice


Joined: 01 Feb 2004
Posts: 197
Location: "the can", WA

PostPosted: Sun May 01, 2005 3:35 am    Post subject: Reply with quote

www.whatismyip.com
Back to top
View user's profile Send private message
astrodelgato
n00b
n00b


Joined: 01 Jan 2004
Posts: 66
Location: Atlanta, GA

PostPosted: Sun May 01, 2005 3:41 am    Post subject: Reply with quote

Quote:
www.whatismyip.com


That's cool, but there's gotta be an internal way. In other words, I don't wanna rely on that site being up, connecting to it, and parsing the html.

Thanks, though.

...but, that does make me think...if I hit my server, then my server should be able to get my IP just like that site does...

-austin
Back to top
View user's profile Send private message
astrodelgato
n00b
n00b


Joined: 01 Jan 2004
Posts: 66
Location: Atlanta, GA

PostPosted: Sun May 01, 2005 3:47 am    Post subject: Reply with quote

Now I see that the SSH_CLIENT environment variable on my server tells my IP. I guess the only thing more direct than that would be a function that only tells the IP. SSH_CLIENT gives you:

client_IP client_PORT server_PORT
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 17862

PostPosted: Sun May 01, 2005 3:49 am    Post subject: Reply with quote

There are others, but thesse were the first I came across...

https://forums.gentoo.org/viewtopic-t-25822.html
https://forums.gentoo.org/viewtopic-t-167741.html
https://forums.gentoo.org/viewtopic-t-108744.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum