External Ip from Resolver

May 10, 2025 · Tyler Yeager

External Ip from Resolver
alias externalip="dig @resolver1.opendns.com myip.opendns.com +short"

There’s a lot of websites that help you resolve your external ip address.

Some search engines will just return it when you search “What is my ip address” as well now.

But, these sites go down or are abandoned. Do you really want your deployment script to fail years from now because some service decided enough was enough and bailed out of the ip service business?

Instead, resolve directly with the resolver. It’s what they’re good at after all. Drop the above into your script file

.bash_aliases
alias externalip="dig @resolver1.opendns.com myip.opendns.com +short"

Now when you load again, you can just call externalip and get your external ip address.

Did you find this interesting?

Consider subscribing 😊

No AI-generated content or SEO garbage.

Unsubscribe anytime