I am getting unreal IP from DuckDNS and "where is my IP address" websites

I haven’t been able to connect to my Home Assistant through the Duck DNS domain for a few days. The problem is that the public IP changes every time a request is made. If I look at https://whatismyipaddress.com it gives me one IP address, if I look at https://www.iplocation.net/ another… Duck DNS’s IP is constantly changing and it gets an unreal IP. If I check the router if I get the real IP. I set it to Duck DNS and the connection works… until the IP is reloaded again (2 minutes). What I can do?

The DuckDNS service tracks IP changes. That’s what it is for, it’s a dynamic DNS service.

If the IP obtained by DuckDNS does not match what your router reports as the public ip address then you have some network address translation going on somewhere between your router and DuckDNS.

Does your ISP use GCNAT?

Share the first two octets of your router’s public IP address (e.g. 123.123.x.x) or just look it up and see if it is in the non routable local IP address range.

I meant that the IP changes every minute, before it didn’t change so infrequently.

Thanks @tom_l you are right, it seems that they have changed to CGNAT overnight. My public address is 100.100.x.x. I’m going to contact my ISP and have that service removed.

IP address 100.100.100.100 is actually a privacy mask.

100.64.0.0/10 is a CGNAT range.

Isn’t 100.100 CG-Nat? I have read that it goes from the range 100.64.0.0 to 100.127.255.255

That’s exactly what 100.64.0.0/10 is, the range 100.64.0.0 to 100.127.255.255

I was just checking you didn’t have 100.100.100.100, as that could be masking a routable address, maybe. I’m not really sure how it gets applied.

Oh OK. I have understood. No, it’s not 100.100.100.100. What surprises me is that port forwarding works. If I go to 100.100.x.x:8123 access. Is this possible with CG-NAT?

Sure port forwarding will work if you know your public IP address (the reverse NAT is taken care of by your ISP). Unfortunately DuckDNS has no way to know what this address is because it has no access to the NAT your ISP is doing.

Interestingly Nabu Casa completely avoids this, as I found out yesterday.

I have an automatic failover cellular/mobile modem I use for backup internet access in case the fibre to my home is cut. Unfortunately all cellular services use CGNAT here. While moving my fibre modem the other day I was still able to view my Home Assistant web page via the Celular modem! Something I could not do when I used DuckDNS. All I could do on the cellular service with DuckDNS was receive notifications.

Thanks @tom_l. I have fixed the problem by asking my ISP to remove CG-NAT for me. It already works correctly.

1 Like