Bob Ackerman wrote:

> my box is behind a D-Link router 704.
> The router gets its ip from my isp using dhcp.
> anyone know how to get that external ip from the router?
> is any module designed to find your external ip when  you are on a lan?
> router is admined from a web page, so i guess it is possible to using LWP
> (or some other module?) to retrieve the info from the web page.

I run a cron job on my internal network that sends a request every 10 
minutes to a cgi program that sits on my public web server. The cgi program 
does some authenticication, and then sticks the value of $ENV{REMOTE_HOST} 
in a DB_File. This works because the router makes the request, so 
$ENV{REMOTE_HOST} is populated with my router's dynamically assigned ip 
address.

I then have a redirector cgi program that sits on my public web server that 
redirects to my router. So http://my.public.site.com/redirector.cgi 
redirects my browser to the router, which handles the port forwarding.

This way, I always have access to my current dynamic ip address. Unless, of 
course, it changes and the cron job hasnt run ret, which has happened.

The other suggestions are just as good, but as always TMTOWTDI.

Todd W.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to