Re: Get the external IP address from a Linux box
- Date: Thu, 24 May 2018 00:19:48 -0700
- From: conover@xxxxxxxxx (John Conover)
- Subject: Re: Get the external IP address from a Linux box
> >> I am looking for a native package on Debian, that can give me the
> >> external IP address of the machine.
> > Hi Andre.
> > Type "ifconfig" without the quotes. The record you are looking for is
> > inet addr: for IPV4. Its about the second line from the top.
> ifconfig would only work if you are directly assigned the public,
> external IP. If you are behind eg. a router that does NAT, you would
> only see the private IP internal to the local network.
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
John Conover, conover@xxxxxxxxx, http://www.johncon.com/