Get your public IP
Useful when you want to add your IP to a security group in AWS on the command line for example
IPv4 - OpenDns Resolver
dig +short myip.opendns.com @resolver1.opendns.com
IPv4 - Google Resolver
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
IPv6 - Google Resolver
dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com
Last modified: 30 March 2024