Network management: Difference between revisions

Jump to navigation Jump to search
Get public IP address from CLI
Line 48: Line 48:
== Get public IP address from CLI ==
== Get public IP address from CLI ==


<source lang="bash">
<source lang="console">
$ dig +short myip.opendns.com @resolver1.opendns.com
$ dig +short myip.opendns.com @resolver1.opendns.com // this one doesn't seem to work


$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'
$ dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'
$ wget -qO- http://ipecho.net/plain | xargs echo
</source>
</source>

Navigation menu