Skip to content

Instantly share code, notes, and snippets.

@narfel
Created February 13, 2020 20:38

Revisions

  1. narfel revised this gist Feb 13, 2020. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions ip-address
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,6 @@ ip route get 1.2.3.4 | awk '{print $7}'
    nmcli -p device show

    remote:
    dig +short myip.opendns.com @resolver1.opendns.com

    curl or wget -qO- <host>
    hosts:
    ifconfig.me
  2. narfel created this gist Feb 13, 2020.
    21 changes: 21 additions & 0 deletions ip-address
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    local:
    hostname -I optional with | awk '{print $1}'
    ip addr show (ip a)
    ifconfig -a
    ip route get 1.2.3.4 | awk '{print $7}'
    nmcli -p device show

    remote:
    dig +short myip.opendns.com @resolver1.opendns.com

    curl or wget -qO- <host>
    hosts:
    ifconfig.me
    https://diagnostic.opendns.com/myip
    http://checkip.amazonaws.com
    ipinfo.io/ip
    ident.me
    icanhazip.com
    ipecho.net/plain
    bot.whatismyipaddress.com
    api.ipify.org