mholt / caddy-dynamicdns

Caddy app that keeps your DNS records (A/AAAA) pointed at itself.
Apache License 2.0
250 stars 25 forks source link

domain not found in DNS #29

Closed ohitstom closed 2 years ago

ohitstom commented 2 years ago

On startup it says: domain not found in DNS {"domain": "@"} then says theres a different ip address even if there isnt. If i set the dns to something other than the servers ip, it is correctly setting it, but seems to be triggering when it doesnt need to.

my config is below:

{   
    dynamic_dns {
        provider cloudflare {image below}

        domains {
            url.tk @
        }
        ip_source simple_http https://icanhazip.com
        ip_source simple_http https://api64.ipify.org
        check_interval 5m
        versions ipv4
        ttl 1h
    }
}

IMAGE

A | url.tk | public_ip | Proxied | Auto -- | -- | -- | -- | --
mholt commented 2 years ago

What are your full logs? (Unredacted please, except for credentials)

ohitstom commented 2 years ago

image image image

mholt commented 2 years ago

Thanks, that's helpful.

You have an A record named tompc.tk within your tompc.tk zone. That looks like a mistake: tompc.tk.tompc.tk.

It probably should be @.

This doesn't appear to be an issue with this module, so I'll close this issue.

ohitstom commented 2 years ago

Whenever i type in @ for the name it sets it to tompc.tk tompc.tk does resolve to tompc.tk tompc.tk.tompc.tk does not

image

mholt commented 2 years ago

Does Cloudflare let you use .tk domains with their API? I've heard that they have restrictions on what you can do with .tk. What happens if you try a more "normal" domain?

ohitstom commented 2 years ago

I dont really have access to another domain, and seeing as it can change the ip regardless i wouldnt see why its a limitation. Are you sure i havent setup my api key incorrectly as per the screenshots in the original issue?

mholt commented 2 years ago

I don't really know, tbh. I use this plugin with Cloudflare and it works fine for me :no_mouth: I'd recommend debugging the actual API response by putting some log.Printlns in the code or something like that.

Did it actually update the DNS record properly though? Looks like it still worked.

ohitstom commented 2 years ago

It is updating the record, just thinks its wrong at startup... By any chance could i have a pic of your dns setup so i can compare? obviously with ip etc taken out.

ohitstom commented 2 years ago

Nevermind, it works regardless so theres no need, the added check at startup really doesnt effect anything anyways