<div dir="auto"><a href="http://ifconfig.me">ifconfig.me</a> and <a href="http://icanhazip.com">icanhazip.com</a> works the same. </div><div class="gmail_extra"><br><div class="gmail_quote">On Jan 27, 2018 19:25, "Giles Orr via talk" <<a href="mailto:talk@gtalug.org">talk@gtalug.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">On 27 January 2018 at 20:03, Don Tai via talk <span dir="ltr"><<a href="mailto:talk@gtalug.org" target="_blank">talk@gtalug.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have wanted to know how to do this but never had the reason. My first inclination is to write a shell script in a loop. You can control the timing and save results to a file if necessary. Here's the command that seems to work<div><br></div><div><a href="https://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-a-shell-script" target="_blank">https://unix.stackexchange.com<wbr>/questions/22615/how-can-i-get<wbr>-my-external-ip-address-in-a-<wbr>shell-script</a> <div><br></div><div><pre><code>dig +short <a href="http://myip.opendns.com" target="_blank">myip.opendns.com</a> @<a href="http://resolver1.opendns.com" target="_blank">resolver1.opendns.com</a></code></pre><pre><code><br></code></pre><pre><code>It seems to work. I usually check my ip using a google search. For a faster response you could find the RoBeUs dns server.</code></pre><pre><code>Post up your script if you write one.</code></pre><pre>Don<br></pre></div></div></div><div class="m_5700580053022713522HOEnZb"><div class="m_5700580053022713522h5"><div class="gmail_extra"><br><div class="gmail_quote">On 27 January 2018 at 14:46, William Park via talk <span dir="ltr"><<a href="mailto:talk@gtalug.org" target="_blank">talk@gtalug.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I recently switched to CarryTel, and I'm getting disconnected quite often.<br>
So, I want to monitor my external IP, every minute.  For this, I usually<br>
use <<a href="http://myexternalip.com/raw" rel="noreferrer" target="_blank">http://myexternalip.com/raw</a>>, but it has rate limit.<br>
<br>
What site do you use to get your external IP?  I want to round-robin<br>
through these.  Google gives you this when you search "what is my ip",<br>
but it's difficult to dig it out.  Simpler, the better.<span class="m_5700580053022713522m_1055695808265999904HOEnZb"></span></blockquote></div></div></div></div></blockquote><div><br></div><div>There are a lot of services like this.  Here's one I've used in the past:<br><br></div><div>     $ curl <a href="http://ifconfig.co" target="_blank">ifconfig.co</a><br></div><div>     xx.yyy.zz.www<br><br></div><div>It returns just an IP address, which is very useful (and low bandwidth).  I have no idea if it has a rate limit.<br><br></div><div>Your problem if you're round-robin-ing several such sources will be consistency.  Building on a previously mentioned idea, I'd suggest writing a function for each source that returns only the IP (or whatever information you're interested in).<br><br></div><div>So ... is the problem disconnection?  The duration of the disconnection?  The fact that your IP changes?  I personally wouldn't be concerned if my IP changed (I don't run externally accessible services), so long as I have a connection.  So I'd be logging a never-ending ping to some source like 8.8.4.4 (Google DNS) to determine how long and how often I was disconnected for.  (I'm not really looking for answers to these questions, just suggesting things to think about.)<br></div><br></div>-- <br><div class="m_5700580053022713522gmail_signature" data-smartmail="gmail_signature">Giles<br><a href="https://www.gilesorr.com/" target="_blank">https://www.gilesorr.com/</a><br><a href="mailto:gilesorr@gmail.com" target="_blank">gilesorr@gmail.com</a></div>
</div></div>
<br>---<br>
Talk Mailing List<br>
<a href="mailto:talk@gtalug.org">talk@gtalug.org</a><br>
<a href="https://gtalug.org/mailman/listinfo/talk" rel="noreferrer" target="_blank">https://gtalug.org/mailman/<wbr>listinfo/talk</a><br>
<br></blockquote></div></div>