https://test-ipv6.com gives me an ipv6 address as:
"Your IPv6 address on the public Internet appears to be 2604:...."
How can I get that information through the commandline?
For IPv4 I can do this :
wget -qO- http://ipecho.net/plain
and get the external IPv4 ip for my LAN
I want that service for IPv6. IPv6 is a different animal I understand but the notion of external access by host is still relevant.
I see that test-ipv6.com
returns a different internet IPv6 address for each of my LAN-hosts' net devices alternatively there may be a way of getting that info from the output of each host. So:
ip a | grep inet6
will list the IPv6 addresses associated with each network device but I don't know how to identify which one of those addresses is the address "on the public internet". Is there a universal rule, a pattern that identifies that address?
I found this on a gist