Also seeĀ How to get your current IPv4 address using wget
Use
wget -qO- https://ipv6.techoverflow.net/api/get-my-ip
which uses the TechOverflow get-my-ip
API.
Example:
$ wget -qO- https://ipv6.techoverflow.net/api/get-my-ip 2003:ea:70a:d600:ee98:42ca:b0bb:ac75
If your computer does not have IPv6 connectivity enabled, you will not see any output.
Prefer a JSON response?
Use https://ipv6.techoverflow.net/api/get-my-ip-json
instead:
wget -qO- https://ipv6.techoverflow.net/api/get-my-ip-json
Example:
$ wget -qO- https://ipv6.techoverflow.net/api/get-my-ip-json {"ip": "2003:ea:70a:d600:ee98:42ca:b0bb:ac75"}
Want this API on your own server? Check outĀ How to make your own ‘get my current IP address’ server using only nginx