reading IP address given via DHCP
gabe at gundy.org
Mon Sep 23 15:35:51 MDT 2013
On Mon, Sep 23, 2013 at 2:15 PM, S. Dale Morrey <sdalemorrey at gmail.com> wrote:
> There is also doing a wget or curl to something like whatsmyip and grabbing
> the output from there as well.
> You may also wish to look at STUN since that's basically what it does.
> Although I'm not aware of a stun application that can be run from a shell.
In most cases, if you're getting IPs via DHCP, you're likely also
behind a NAT (at least in most small office / home setups). In which
case, `curl icanhazip.com` or whatever will work, but it will give you
the public IP being used at your gateway.
More information about the PLUG