Skip to content

Instantly share code, notes, and snippets.

@rhemz
Created September 2, 2022 02:14
Show Gist options
  • Save rhemz/6e412a1abe3d0181ca1a714d7aab8821 to your computer and use it in GitHub Desktop.
Save rhemz/6e412a1abe3d0181ca1a714d7aab8821 to your computer and use it in GitHub Desktop.
get public IP on alpine when you can't install anything
nslookup -type=txt o-o.myaddr.l.google.com ns1.google.com | grep "text = " | awk '{print $4}' | tr -d '"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment