Unhealthy IP Lookup for Cloudflare proxied domains. #24

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

Originally created by @Chewza on GitHub (Apr 4, 2020).

When utilizing an A record for dynamic DNS on a proxied CloudFlare domain, the following is seen constantly in the console log.

WARN unhealthy: lookup IP address of MyDomain.com is 104.18.55.237 instead of W.X.Y.Z {"node_id": 0}
Note that 104.18.55.237 is the CloudFlare proxy IP and W.X.Y.Z is my current Public IP.

I'm utilizing OpenDNS for the IP lookup.

Originally created by @Chewza on GitHub (Apr 4, 2020). When utilizing an A record for dynamic DNS on a proxied CloudFlare domain, the following is seen constantly in the console log. `WARN unhealthy: lookup IP address of MyDomain.com is 104.18.55.237 instead of W.X.Y.Z {"node_id": 0} ` Note that 104.18.55.237 is the CloudFlare proxy IP and W.X.Y.Z is my current Public IP. I'm utilizing OpenDNS for the IP lookup.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 4, 2020):

Thanks for creating your first issue 👍 Feel free to use Slack if you just need some quick help or want to chat

@github-actions[bot] commented on GitHub (Apr 4, 2020): Thanks for creating your first issue :+1: Feel free to use [Slack](https://join.slack.com/t/qdm12/shared_invite/enQtODMwMDQyMTAxMjY1LTU1YjE1MTVhNTBmNTViNzJiZmQwZWRmMDhhZjEyNjVhZGM4YmIxOTMxOTYzN2U0N2U2YjQ2MDk3YmYxN2NiNTc) if you just need some quick help or want to chat
Author
Owner

@qdm12 commented on GitHub (Apr 4, 2020):

Interesting, what happens when you run

docker run -it --rm alpine:3.11 nslookup MyDomain.com

What's the IP address?

For now, the healthcheck lookup only resolves your domain.com and checks the IP resolved matches your current public IP address. Maybe it should be tweaked for proxied domain, I'm not sure how to approach that yet.

@qdm12 commented on GitHub (Apr 4, 2020): Interesting, what happens when you run ```sh docker run -it --rm alpine:3.11 nslookup MyDomain.com ``` What's the IP address? For now, the healthcheck lookup only resolves your domain.com and checks the IP resolved matches your current public IP address. Maybe it should be tweaked for proxied domain, I'm not sure how to approach that yet.
Author
Owner

@Chewza commented on GitHub (Apr 4, 2020):

Output of that command is the CloudFlare proxied IP address, not my public IP address which is the expected outcome.

The only way I could see health check working on a proxied CloudFlare domain in the config, is logic could be implemented to pull the IP configured for that domain from the CloudFlare API, and compare with the IP from a current IP poll from the configured IP Check mechanism. If different, update the domain record, if not move along.

Additionally, is the health check causing a push of the user's public ip address to cloudflare each time it fails? Or is this purely informational?

And finally, it appears that I'm only receiving the error on a domain I have an @ configured for the host variable.

@Chewza commented on GitHub (Apr 4, 2020): Output of that command is the CloudFlare proxied IP address, not my public IP address which is the expected outcome. The only way I could see health check working on a proxied CloudFlare domain in the config, is logic could be implemented to pull the IP configured for that domain from the CloudFlare API, and compare with the IP from a current IP poll from the configured IP Check mechanism. If different, update the domain record, if not move along. Additionally, is the health check causing a push of the user's public ip address to cloudflare each time it fails? Or is this purely informational? And finally, it appears that I'm only receiving the error on a domain I have an @ configured for the host variable.
Author
Owner

@qdm12 commented on GitHub (Apr 5, 2020):

For now you can set "no_dns_lookup": false for that record to avoid the DNS lookup part of the healthcheck. The healthcheck also verifies the latest state of the update, and will mark the container as unhealthy if any update failed for whatever reason. I think that should be enough.

And yes, the healthcheck is only informational, it doesn't retry on failure.

The only thing I'll dig into in the coming days is why the DNS lookup does not work only for @ host proxy records for Cloudflare, but I might need your help on that one 😉 I'll post back here once I'm into it.

Thanks!

@qdm12 commented on GitHub (Apr 5, 2020): For now you can set `"no_dns_lookup": false` for that record to avoid the DNS lookup part of the healthcheck. The healthcheck also verifies the latest state of the update, and will mark the container as unhealthy if any update failed for whatever reason. I think that should be enough. And yes, the healthcheck is only informational, it doesn't retry on failure. The only thing I'll dig into in the coming days is why the DNS lookup does not work only for `@` host proxy records for Cloudflare, but I might need your help on that one 😉 I'll post back here once I'm into it. Thanks!
Author
Owner

@Chewza commented on GitHub (Apr 6, 2020):

Your efforts are much appreciated! Happy to help when you're ready!

@Chewza commented on GitHub (Apr 6, 2020): Your efforts are much appreciated! Happy to help when you're ready!
Author
Owner

@Chewza commented on GitHub (Apr 8, 2020):

FYI. Adding that suggested boolean to the domain code block in question doesn't seem to affect the outcome. I'm still receiving the errors.

2020-04-08_17-01-25_3xpB0BjdWG

2020-04-08T17:02:08.267-0400 WARN unhealthy: lookup IP address of MyDomain.com is 104.18.55.237 instead of 72.84.xx.xx {"node_id": 0}

@Chewza commented on GitHub (Apr 8, 2020): FYI. Adding that suggested boolean to the domain code block in question doesn't seem to affect the outcome. I'm still receiving the errors. ![2020-04-08_17-01-25_3xpB0BjdWG](https://user-images.githubusercontent.com/8115774/78833337-b2de1c00-79ba-11ea-9afb-1875d4ca449f.png) `2020-04-08T17:02:08.267-0400 WARN unhealthy: lookup IP address of MyDomain.com is 104.18.55.237 instead of 72.84.xx.xx {"node_id": 0} `
Author
Owner

@qdm12 commented on GitHub (Apr 8, 2020):

You need to set "no_dns_lookup": true, sorry about that little mistake 😉

@qdm12 commented on GitHub (Apr 8, 2020): You need to set `"no_dns_lookup": true`, sorry about that little mistake 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#24