<div>If you on the private network behind the RT-N16 and you have some webspace out on the internets.</div><div><br></div><div>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...</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: &#39;Times New Roman&#39;; font-size: medium; ">REMOTE_ADDR = 115.70.121.139</span></div><div><span class="Apple-style-span" style="font-family: &#39;Times New Roman&#39;; font-size: medium; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: &#39;Times New Roman&#39;; font-size: medium; ">You could even get the PHP script to write the IP to a file and grab it off the webserver from other locations.</span></div>
<div><br></div><div>I didn&#39;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 <a href="http://yourhost.dyndns.org">yourhost.dyndns.org</a></div>
<div><br></div><div><font class="Apple-style-span" face="&#39;Times New Roman&#39;"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></div><div><br></div><div> &lt;?php</div><div>    foreach($_SERVER as $h=&gt;$v)</div>
<div>        if(ereg(&#39;REMOTE_ADDR&#39;,$h,$hp))</div><div>                echo &quot;$h = $v\n&quot;;</div><div>           header(&#39;Content-type: text/html&#39;);</div><div>?&gt;</div><br><div class="gmail_quote">On 5 August 2010 17:59, Jorge Almeida <span dir="ltr">&lt;<a href="mailto:jjalmeida@gmail.com">jjalmeida@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is there any sensible, script-friendly, way of finding my router&#39;s<br>
external (dynamical) IP? It looks surprisingly difficult, judging by<br>
Google results...<br>
The thing is an ASUS RT-N16. I intend to install dd-wrt, eventually,<br>
but for the time being it has the original software, which appears to<br>
be complete crap, BTW.<br>
<br>
Jorge Almeida<br>
_______________________________________________<br>
Linux-users mailing list ( <a href="mailto:Linux-users@linux-sxs.org">Linux-users@linux-sxs.org</a> )<br>
Unsub/Password/Etc:<br>
<a href="http://linux-sxs.org/mailman/listinfo/linux-users" target="_blank">http://linux-sxs.org/mailman/listinfo/linux-users</a><br>
<br>
Need to chat further on this subject? Check out #linux-users on <a href="http://irc.linux-sxs.org" target="_blank">irc.linux-sxs.org</a> !<br>
</blockquote></div><br>