Description
Queries for IPv4 via api.ipify.org and for IPv6 via seeip.org often take some time since this service seems to be frequented very much, so I searched for an alternative. As an owner of a fritzbox router, I knew, that there should be some way to query this information directly. I found a solution here: https://wiki.ubuntuusers.de/FritzBox/Skripte/ , where variant 2 worked very well on my bash (Ubuntu 22.04 server behind fritzbox in cable network; assigning public ip4 ordered as option). Maybe we could take some load off the services api.ipify.org and seeip.org.
For IPv6 you will have to use the IP address of the host, since IPv6 does not use translation (i don't remember the correct term right now). Here I use the basic commands
hostname -I | cut -d " " -f 3
( in my case it's f 3, in others it might be f 2)
Another way to deal with multiple IPv6 addresses could be to filter out those starting with 'fd00' and 'fe80' since they are only local.
Unfortunately I have no php-skills, otherwise I would try to include these options into the functions.php. For now I use two little bash scripts when invoking './update'
Maybe we could help to take some load off the services api.ipify.org and seeip.org.