http://www.perlmonks.org?node_id=368764


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