Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lookup domain on ip: no such host #25

Closed
v0idp opened this issue Jan 4, 2020 · 11 comments
Closed

lookup domain on ip: no such host #25

v0idp opened this issue Jan 4, 2020 · 11 comments

Comments

@v0idp
Copy link

v0idp commented Jan 4, 2020

Hey there I've setup my domain with cloudflare and your ddns-updater in docker. Everything seems to work perfectly fine. it's updating my wildcard subdomain just fine but the docker container itself seems to "unhealthy" all the time and I get this log:

2020-01-04T18:47:48.976Z	WARN	Unhealthy	{"node_id": 0, "error": "lookup CENSORED_DOMAIN on CENSORED_IP:53: no such host"}

Any idea why this is happening ?

my config.json looks like this:

{
  "settings": [
    {
        "provider": "cloudflare",
        "domain": "CENSORED",
        "host": "*",
        "ip_method": "opendns",
        "zone_identifier": "CENSORED",
        "identifier": "CENSORED",
        "email": "CENSORED@CENSORED.com",
        "key": "CENSORED"
    }
  ]
}
@qdm12
Copy link
Owner

qdm12 commented Jan 4, 2020

The Docker healthcheck basically runs a DNS lookup of the hostname, on this line.

Is it a new hostname with a new IP address? If so, it might work in a few minutes so that it has time to be published on your DNS server (ISP or i.e. Google/Cloudflare etc.).

Otherwise, can you try

docker run -it --rm alpine:3.10 nslookup <your-domain>

and report back the (redact your IP address etc.) output?

@v0idp
Copy link
Author

v0idp commented Jan 4, 2020

nslookup: can't resolve '(null)': Name does not resolve nslookup: can't resolve 'domain.me': Name does not resolve

I mean my domain isn't redirecting anything. It's not supposed to do so. I only use the wildcards subdomain for my services in docker with traefik.

@qdm12
Copy link
Owner

qdm12 commented Jan 4, 2020

Can you try with https://mxtoolbox.com/DNSLookup just to be sure it's not a LAN DNS server issue?

You can try by setting to i.e. 127.0.0.1 (localhost) on the Cloudflare website, then restart the ddns-updater container (or wait 5 minutes) and see if the IP address is changed on their website. If it is, then it may be a Cloudflare issue (I had the case with Namecheap not publishing my updated record for 6 hours).

@v0idp
Copy link
Author

v0idp commented Jan 4, 2020

image

Like I said I have no dns record for the domain itself. Only for the * subdomain wildcard. but the healthcheck checks for the domain. Not sure if I'm correct here.

Also the healthcheck with the IP (it's showing an LAN ip anyways)
{"node_id": 0, "error": "lookup domain.me on 192.168.178.1:53: no such host"}

@qdm12
Copy link
Owner

qdm12 commented Jan 4, 2020

Hm maybe you need to have an A record for host @ as well as host * (wildcard). I had to this on Namecheap to have a wildcard record. I personally don't use Cloudflare so I am not sure, and I tend to not use wildcards either, so I might not be the best person to ask 😆

But if you add a record for this same domain with the host @ the healthcheck will not complain anymore I guess. Or you can use subdomains instead of wildcard (what I do, it's better security wise as well).

@v0idp
Copy link
Author

v0idp commented Jan 4, 2020

How does it improve the security ?

@qdm12
Copy link
Owner

qdm12 commented Jan 5, 2020

Actually I think if you use Traefik you need a wildcard record not to go crazy! I have seen bots trying to access strange subdomains in my logs so I prefer to keep it restricted to what I need. On the other hand, having a wildcard record may make it harder for bots to know what subdomains you actually use which is nice.

Anyway, from the Namecheap website

NOTE: A wildcard DNS record does not cover a root domain (e.g. yourdomain.tld), thus you will need to create a record for @ host additionally.

However my code might be wrong, would you mind trying resolving a.yourdomain.com? That should work with the wildcard.

docker run -it --rm alpine:3.10 nslookup a.<your-domain>

@v0idp
Copy link
Author

v0idp commented Jan 5, 2020

it resolved something. seems to work with subdomain just fine. I am using Namecheap but my DNS is cloudflare.

healthcheck seems to make no sense if I don't use my root domain.

@qdm12 qdm12 closed this as completed in 24c8a9e Jan 6, 2020
@qdm12
Copy link
Owner

qdm12 commented Jan 6, 2020

I just changed my code, you are right. It now tries to resolve any.domain.tld instead of domain.tld if you use a wildcard record. So the Failure message (in the UI, logs, healthcheck.. and Gotify) should not show anymore. Thanks again for pointing this out.

@v0idp
Copy link
Author

v0idp commented Jan 6, 2020

thank you !

@qdm12
Copy link
Owner

qdm12 commented Jan 6, 2020

It's still building the Docker image on Travis. It will probably take another 20-30 minutes (compiling for all CPU architectures is slow...). You can then try restarting the container with the latest image you can pull with

docker pull qmcgaw/ddns-updater

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants