What's My IP Service

Written By Sanjir Habib On May-14th, 2021
Added two more services


Prints your IP4 and IPv6 addresses consecutively, without adding any other character. You occasionally might need it in scripts. There was a popular free service from tnx.nl/ip for it, but that's now down after 12 years and no longer available.

Example runs

$ curl http://myip.habibur.com/
$ curl http://myip6.habibur.com/

Here's a bash script to print all your IPs. Internals and externals.

curl myip.habibur.com
ifconfig | grep inet | grep -v inet6 | awk '{print $2;}' | grep -v '127\.0\.0.1' | grep -v ^$