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

Proxied IP instead correct Ip #43

Closed shark2380 closed 4 years ago

shark2380 commented 4 years ago

Good morning, i'm trying to set it up on raspberry pi4, but it update the A record with the proxied ip instead the reeal wan ip. How do i solved it?

Thanks in advance Shark

shark2380 commented 4 years ago

UPDATE, in a rough way i have modified the script keeping only the line giving me the right IP address.

rotordock commented 4 years ago

I'm getting the same issue, updating with proxied IP instead of wan IP. Any idea how to fix this?

LJRH commented 4 years ago

Same issue: Raspberry pi 4, ubuntu 20.04 using docker-compose with the latest tag.

rotordock commented 4 years ago

adding this was the fix for me;

-e CUSTOM_LOOKUP_CMD=curl -sf4 https://ipinfo.io | jq -r '.ip'

dbrennand commented 4 years ago

I also fixed my issue with a similar method to @rotordock. I added the following environment variable for public IP lookup:

-e CUSTOM_LOOKUP_CMD="curl 'https://api.ipify.org?format=json' | jq -r '.ip'"

This fixed the issue for me.

shark2380 commented 4 years ago

After all this homemade fix I close the issue. Hope that the manteiner take a hint on how to improve him code for everyone. I don't know how to update it on github