This page looks best with JavaScript enabled

WAN IP from CLI

 ·  🎃 kr0m

There are times when we need to know our WAN IP, for example in certain scripts or on servers where we do not have a graphical environment, but as the saying goes, Where there is a shell, there is a way.

We just need to install curl with:

emerge -av net-misc/curl

We have two servers that we can use to check our WAN IP:

curl ifconfig.me
curl icanhazip.com

If you liked the article, you can treat me to a RedBull here