lookup domain on ip: no such host #14

Closed
opened 2025-11-20 04:18:43 -05:00 by saavagebueno · 11 comments
Owner

Originally created by @v0idp on GitHub (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"
    }
  ]
}
Originally created by @v0idp on GitHub (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: ```json { "settings": [ { "provider": "cloudflare", "domain": "CENSORED", "host": "*", "ip_method": "opendns", "zone_identifier": "CENSORED", "identifier": "CENSORED", "email": "CENSORED@CENSORED.com", "key": "CENSORED" } ] } ```
Author
Owner

@qdm12 commented on GitHub (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?

@qdm12 commented on GitHub (Jan 4, 2020): The Docker healthcheck basically runs a DNS lookup of the hostname, on [this line](https://github.com/qdm12/ddns-updater/blob/46766b440eb11ef19682783e6ff741903b4e6feb/internal/router/healthcheck.go#L18). 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 ```sh docker run -it --rm alpine:3.10 nslookup <your-domain> ``` and report back the (redact your IP address etc.) output?
Author
Owner

@v0idp commented on GitHub (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.

@v0idp commented on GitHub (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.
Author
Owner

@qdm12 commented on GitHub (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).

@qdm12 commented on GitHub (Jan 4, 2020): Can you try with [https://mxtoolbox.com/DNSLookup](https://mxtoolbox.com/DNSLookup.aspx) 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).
Author
Owner

@v0idp commented on GitHub (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"}

@v0idp commented on GitHub (Jan 4, 2020): ![image](https://user-images.githubusercontent.com/39016303/71771462-6dcdc800-2f3b-11ea-9104-f72cbf4dc87d.png) 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"} `
Author
Owner

@qdm12 commented on GitHub (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).

@qdm12 commented on GitHub (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).
Author
Owner

@v0idp commented on GitHub (Jan 4, 2020):

How does it improve the security ?

@v0idp commented on GitHub (Jan 4, 2020): How does it improve the security ?
Author
Owner

@qdm12 commented on GitHub (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>
@qdm12 commented on GitHub (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. ```sh docker run -it --rm alpine:3.10 nslookup a.<your-domain> ```
Author
Owner

@v0idp commented on GitHub (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.

@v0idp commented on GitHub (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.
Author
Owner

@qdm12 commented on GitHub (Jan 5, 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.

@qdm12 commented on GitHub (Jan 5, 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.
Author
Owner

@v0idp commented on GitHub (Jan 5, 2020):

thank you !

@v0idp commented on GitHub (Jan 5, 2020): thank you !
Author
Owner

@qdm12 commented on GitHub (Jan 5, 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
@qdm12 commented on GitHub (Jan 5, 2020): It's still building the Docker image on [Travis](https://travis-ci.org/qdm12/ddns-updater). 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 ```sh docker pull qmcgaw/ddns-updater ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#14