Hi,
I am quite certain I am facing a unique “issue” but I’d like to apologise if that is not the case and that the answer had been previously provided.
I am trying to configure DuckDNS following the excellent youtube tutorial by Lewis from Everything Smart Home and I’ve got it working… sort of…
The issue I have is that I seem to have two external IP (this could be because I am using a “booster” that uses the 5G network in conjunction with the good ol’ copper lines) and it seems that DuckDNS is retrieving the “wrong” IP, i.e., not the one that my main router has (my main router being the one that forwards the port).
If I specify the “correct” IP address explicitly in the configuration of DuckDNS then everything works fine and I can use my duckdns domain to access my instance but of course I am not immune to an IP change by my provider and I’d like this to be covered.
Unfortunately, the two services suggested in the DuckDNS Documentation also resolve to the “wrong” IP address and thus I cannot use these either in the configuration.
I have hope though as I found that a dnsip sensor (setup in my configuration.yaml) and the service here https://api.myip.com/ resolve to the correct IP.
The “only” issue remaining is that I do not know how to use the sensor state in the DuckDNS configuration or how to parse the JSON from https://api.myip.com/ which is of this shape:
{"ip":"XXX.XXX.XXX.XXX","country":"Switzerland","cc":"CH"}
Any help would be greatly appreciated.
Many thanks
PS: this is my working DuckDNS configuration with hardcoded IP.
aliases: []
domains:
- xxx.duckdns.org
lets_encrypt:
accept_terms: true
algo: secp384r1
certfile: fullchain.pem
keyfile: privkey.pem
seconds: 300
token: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ipv4: XXX.XXX.XXX.XXX