I’ve always liked how the site ifconfig.me (down today it seems) returns JUST the IP address from command line when accessed via CURL. Unfortunately it is not IPv6 enabled. This morning I set out to CLI-enable ipquail.com. The journey is documented in this short commit history.
This can be used in scripts as well:
I deployed the new files to all Anycast nodes using SaltStack as described in my previous post.
Note: This only works if you are NOT changing the default curl user agent, if you are, you would need to specify curl as your user agent using the -A flag for curl.