ddns-updater icon indicating copy to clipboard operation
ddns-updater copied to clipboard

Bug: Wildcard on first subdomain level resolving not working

Open LeoSum8 opened this issue 1 year ago • 2 comments

TLDR: dns resolve of wildcard domain not working when on first subdomain level (.example.com) while update works*

  1. Is this urgent: No

  2. DNS provider(s) you use: INWX

  3. Program version:

    Running version latest built on 2023-09-13T19:49:02.170Z (commit 13ccb4f)

  4. What are you using to run the container: docker

  5. Extra information (optional)

Logs:

2023-10-04T10:11:50Z INFO reading JSON config from file /updater/data/config.json
2023-10-04T10:11:50Z INFO Found single setting to update record
2023-10-04T10:11:50Z INFO Reading history from database: domain *.example.com host @
2023-10-04T10:11:50Z INFO [backup] disabled
2023-10-04T10:11:50Z INFO [http server] listening on :8000
2023-10-04T10:11:50Z INFO [healthcheck server] listening on 127.0.0.1:9999
2023-10-04T10:11:50Z WARN cannot DNS resolve *.example.com after 5 tries: lookup *.example.com: no such host
2023-10-04T10:11:50Z INFO IPv6 address of *.example.com is invalid IP and your IPv6 address is 2ab2:6dd4:37c9:3101:3832:a80b:1234:1234
2023-10-04T10:11:50Z INFO Updating record [domain: *.example.com | host: @ | provider: inwx | ip: ipv6] to use 2ab2:6dd4:37c9:3101:3832:a80b:1234:1234

Configuration file (remove your credentials!):

{
  "settings": [
    {
      "provider": "inwx",
      "domain": "*.example.com",
      "host": "@",
      "username": "admin",
      "password": "admin",
      "ip_version": "ipv6"
    }
  ]
}

Host OS: Fedore Core OS (FCOS) runing in a bhyve vm on FreeBSD

Hi there, I am running the above-mentioned setup. While updating works, the lookup/resolving doesn't, which leads to the update unnecessarily happening every 5 minutes. I noticed the issue #214 where something similar is adressed but for lower domain levels. Shouldn't my config also lead to doing the dns lookup for any.example.com?

Thanks for your docker image! Leo

LeoSum8 avatar Oct 04 '23 11:10 LeoSum8

Hi, I think I am having a similar problem and I can't find how to solve it. I want to update the root of my domain, "@", while having the web UI on a subdomain (ddns.mydomain.com). Apparently this makes the DNS lookup to fail.

LeVraiRoiDHyrule avatar Jan 05 '24 20:01 LeVraiRoiDHyrule

@LeoSum8 Hi there, sorry for the delay answering 😢! It looks like you're using the @ host with *.example.com, why are you trying to do this 🤔? Sorry if I misunderstood or don't know something, but why not * host and example.com domain to update the wildcard *.example.com? Note to myself: if you did have a misunderstanding, I'll add a check to error out if * is present in the domain field, for all providers.

@LeVraiRoiDHyrule I don't fully understand your issue, where you serve the web ui and what domains you update are independent, please create another issue with the requested information.

qdm12 avatar Jan 18 '24 15:01 qdm12

Hi @qdm12 sorry myself for answering so late now.

I tried your suggestion. But when I put * for host, I get:

2024-02-12T14:07:59Z INFO reading JSON config from file /updater/data/config.json
2024-02-12T14:07:59Z ERROR validating provider settings: host cannot be a "*"
2024-02-12T14:07:59Z INFO Shutdown successful

LeoSum8 avatar Feb 12 '24 14:02 LeoSum8

I removed the restriction in d009ef3d3e9de92752a29bb71706ff0c58bd2a2a please try pulling the latest image and check if it works? I'm not too sure why the restriction was in place and if inwx supports dynamically updating a record with a wildcard owner (host), but let's find out!

(wait 5 minutes for the build to finish)

qdm12 avatar Feb 12 '24 14:02 qdm12

Thank you, this seems to have done the trick! Now everything looks normal. Where is your tipjar? :)

To be clear: It worked before with the @-construction in terms of updating, but it just wouldn't be able to check the ip. Now the logs and the webinterface look normal and show everything is up to date.

LeoSum8 avatar Feb 13 '24 10:02 LeoSum8

Great 💯

Where is your tipjar? :)

Thanks, but don't worry that was a 10 seconds code change 😄 Buuut if you're still happy about the whole project (and me working part-time-no-pay on it), you can check out https://github.com/qdm12/ddns-updater?tab=readme-ov-file#support 🤑

qdm12 avatar Feb 19 '24 17:02 qdm12