Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Getting net addy on localhost?

by dws (Chancellor)
on Nov 27, 2001 at 10:43 UTC ( [id://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 206.62.155.15)?

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-18 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found