Open combro2k opened 3 years ago
In here there is no 'sanity' check if the public_ip is an ipv4 ip or ipv6 The link https://diagnostic.opendns.com/myip resolves ipv6 too.
It sems not be that easy to fix I see in the library many people can't force 'requests' to use ipv4 or ipv6 only to distinct the different lookups.
Thanks for the detailed information. I'll look into this as soon as I can.
The public IP is determined by querying one of the following URLs to see what is returned. This is an entry in your phad.conf fle:
external_ip_url=https://diagnostic.opendns.com/myip,https://www.myexternalip.com/raw,http://ipv4bot.whatismyipaddress.com
PHAD queries the list in order until one returns a valid result. It looks like that first URL, https://diagnostic.opendns.com/myip, is also dual-stack, so when PHAD queries it from a dual-stack environment like yours it's hitting it over IPv6, so it's returning that address.
The easiest fix in this case is likely to just change phad.conf to use http://ipv4bot.whatismyipaddress.com as the external_ip_url
which should always return the IPv4 public IP.
This is more what I meant that time :-) https://github.com/HorlogeSkynet/archey4/blob/3e008fd0b1b6fdd714823f441e51c6bc70d4ee3d/archey/entries/wan_ip.py#L32 So if you have a dual stack setup you can see both IP's
Hi,
I run dualstack it shows me my ipv6 address instead of ipv4. I will check it later what happens :-)