Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to identify router IP address

by davido (Cardinal)
on Jun 22, 2004 at 15:29 UTC ( #368764=note: print w/replies, xml ) Need Help??


in reply to How to identify router IP address

One simple solution is to hit one of those websites that reflects your IP address. It's easy for an external website to see what IP is doing an HTTP request, especially if you're not doing anything funky to hide your router's IP.

In Broadband Dynamic IP Poster I have a series of small scripts that can be used to post your current IP to a remote site so that you can find your IP from somewhere on the outside world. But one of those scripts sets up an IP reflector, which is all you would need to find your IP from within your network. Take a look at that node, and it should be helpful to you.

You could also scrape the web-interface to your router, however, if your router is like mine, it's heavily Javascript-laden, making it a little tricky to scrape. That's why in Broadband Dynamic IP Poster I chose the reflector site method.


Dave

Replies are listed 'Best First'.
Re^2: How to identify router IP address
by dba (Monk) on Jun 22, 2004 at 18:41 UTC
    Thank you monks for your replies.
    I will go with 'http://checkip.dyndns.org'
     perl -MLWP::Simple -e "getprint 'http://checkip.dyndns.org'" is neat.

    I get  <html><head><title>Current IP Check</title></head><body>Current IP Address: 24.x.x.x</body></html>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2021-10-28 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?