This approach has one significant shortcoming. If the PC is behind some NAT box (say, a corporate firewall or a LinkSys Broadband Router), then the IP address of the PC isn't particularly interesting to the outside world, since the outside world won't be able to connect to the PC using that IP address.

I have DSL into a LinkSys router/hub, and have the DMZ host set to the local IP address of a Linux box. (Incoming socket connections get routed to the DMZ host, after the IP address gets translated from the router's externally visible IP address to the 192.168.1.* internal address specified for the DMZ host.)

A cron job on the Linux box periodically makes an "I'm alive" HTTP request to a CGI on my ISP. The CGI captures REMOTE_ADDR, which is the externally visible IP address for the router (and the Linux box, since it's the DMZ host.)

Invoking the same CGI with no parameters products a short page of HTML listing the last-known IP address for my home router/Linux box, along with a note about how recent the address is. I hit the CGI from work, open a secure shell connection to my home box, and can IRC from there.


In reply to RE: Slick way to upload dynamic IP addresses by dws
in thread Slick way to upload dynamic IP addresses by adam_bultman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.