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.07k stars 213 forks source link

ERROR: Failed To Get Public IPv4 Address #13

Closed hannonq closed 4 years ago

hannonq commented 5 years ago

Hi, I'm running into the error message ERROR: Failed To Get Public IPv4 Address and I'm failing to find the reason why this is happening.

When I run the command used to get the IP address dig +short @resolver1.opendns.com myip.opendns.com A manually on the terminal, it works fine.

I'm running the container on a Ubuntu Server 18.04. I have tried setting the network mode to "host", as well using the default, but in both cases I get the same problem.

Any idea on how to debug this?

randomparity commented 4 years ago

Any chance you have IPv6 enabled in your network?

I'm also running Ubuntu 18.04 on my Docker host and I don't get an address when running the command above on the host. But if I specify IPv4 only with the command dig +short -4 @resolver1.opendns.com myip.opendns.com A then I get the expected address.

hannonq commented 4 years ago

@randomparity no, I have disabled IPv6 altogether in my network. Besides that, when I run dig +short @resolver1.opendns.com myip.opendns.com A on the terminal of the host machine, it works. But I still didn't manage to make the container work. I'm thinking about just running a native script directly on the host :/

aikiharp commented 4 years ago

I'm having the same problem.

barisozdag commented 4 years ago

I was having the same problem. RRTYPE parameter is case sensitive. Can you check environment RRTYPE=A, not RRTYPE=a?

hannonq commented 4 years ago

Well noticed, @barisozdag. It works now :)