Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Getting net addy on localhost?

by dws (Chancellor)
on Nov 27, 2001 at 10:43 UTC ( #127745=note: print w/replies, xml ) Need Help??

in reply to Getting net addy on localhost?

I want to get the correct IP address (and if possible, hostname) for my computer ... how do I get my real IP (which is currently

Since you say "currently", I'm going to assume that your address is assigned dynamically by your ISP/DSL/Cable provider.

The way I attack this problem is by periodically pinging a hidden CGI on my external web site. The CGI records the REMOTE_ADDR that pinged it, and responds with that REMOTE_ADDR. Then, from work, I can hit another hidden page on my site that tells me how recently my home machine reported in, and what IP address it used. (My DSL provider will drop the link after a few minutes of inactivity.) If the connection is still up, I can then reach it from the outside world.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://127745]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2021-10-16 12:40 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (69 votes). Check out past polls.