oznu / docker-cloudflare-ddns

A small amd64/ARM/ARM64 Docker image that allows you to use CloudFlare as a DDNS / DynDNS Provider.
https://hub.docker.com/r/oznu/cloudflare-ddns/
GNU General Public License v3.0
1.08k stars 219 forks source link

Fails to find correct IP address on BT (UK ISP) #40

Closed mahood73 closed 4 years ago

mahood73 commented 4 years ago

Hi there, just recently this has started to fail for me. I've tracked it down to the following:

In app/clouflare.sh it tries a couple of methods. The first one: dig +short @1.1.1.1 ch txt whoami.cloudflare | tr -d '"' gives a response of "212.127.0.xxx" - which is a BT proxy, and not my own IP. Obviously it 'succeeds' so it uses that IP to update Cloudflare DNS. which then fails as BT don't forward it on to me.

The other method: curl -sf4 https://ipinfo.io | jq -r '.ip' gives the true IP address of my internet connection (86.155.76.xxx)

The same is true of the IPv6 checks, as far as I can tell.

Obviously your script is just responding to what Cloudflare themselves send back, but is there any way to resolve this?

oznu commented 4 years ago

38 will allow you to resolve this yourself. I need to make a few changes before merging to master though.

mahood73 commented 4 years ago

OK, that looks promising. For now I'll edit my local copy to comment out the failing modes.

Thanks for the fast response!

martinchapman commented 4 years ago

@mahood73 Any communication from BT or Cloudflare about this that you're aware of? It would be nice to find a more robust fix than circumventing the failing modes.

oznu commented 4 years ago

CUSTOM_LOOKUP_CMD option is now a thing - see the README for details.

Mearman commented 4 years ago

I'm using CUSTOM_LOOKUP_CMD with curl icanhazip.com now, but I'm curious where it was getting the 212.127.0.xxx addresses from? Is BT doing something funny with cloudflare traffic?