WAN-IP of router
James McDonald
james at jamesmcdonald.id.au
Thu Aug 5 04:03:41 PDT 2010
If you on the private network behind the RT-N16 and you have some webspace
out on the internets.
Put a php script up on an internet server with the php code below and then
do a curl of it and then parse the REMOTE_ADDR variable and you have your
wan ip...
REMOTE_ADDR = 115.70.121.139
You could even get the PHP script to write the IP to a file and grab it off
the webserver from other locations.
I didn't google the specs but does the RT-N16 have a setting for dynamic
dns? Maybe create an account with a ddns provider and configure your router
to update the DDNS setting and then just dig the host name e.g. dig
yourhost.dyndns.org
<?php
foreach($_SERVER as $h=>$v)
if(ereg('REMOTE_ADDR',$h,$hp))
echo "$h = $v\n";
header('Content-type: text/html');
?>
On 5 August 2010 17:59, Jorge Almeida <jjalmeida at gmail.com> wrote:
> Is there any sensible, script-friendly, way of finding my router's
> external (dynamical) IP? It looks surprisingly difficult, judging by
> Google results...
> The thing is an ASUS RT-N16. I intend to install dd-wrt, eventually,
> but for the time being it has the original software, which appears to
> be complete crap, BTW.
>
> Jorge Almeida
> _______________________________________________
> Linux-users mailing list ( Linux-users at linux-sxs.org )
> Unsub/Password/Etc:
> http://linux-sxs.org/mailman/listinfo/linux-users
>
> Need to chat further on this subject? Check out #linux-users on
> irc.linux-sxs.org !
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/linux-users/attachments/20100805/6b30f8b2/attachment-0002.html
More information about the Linux-users
mailing list