TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.5k stars 220 forks source link

DuckDNS IPv6 NXDOMAIN error #152

Closed ThisIsCyreX closed 2 years ago

ThisIsCyreX commented 2 years ago

Describe the bug
GoDNS won't update my IPv6. Error NXDOMAIN

Log

godns.exe
level=info msg="GoDNS started, entering main loop..."
level=info msg="Creating DNS handler with provider: DuckDNS"
level=debug msg="currentIP is:MYIPv6"
level=error msg=NXDOMAIN

Steps to Reproduce

Use DuckDNS subdomain and update IPv6 via GoDNS.

Your GoDNS configuration

{
    "provider": "DuckDNS",
    "password": "",
    "login_token": "TOKEN",
    "domains": [
        {
            "domain_name": "duckdns.org",
            "sub_domains": [
                "SUBDOMAIN"
            ]
        }
    ],
    "ipv6_url": "https://api-ipv6.ip.sb/ip",
    "ip_type": "IPv6",
    "interval": 300,
    "resolver": "2606:4700:4700::1111",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36",
    "use_proxy": false,
    "debug_info": true,
    "run_once": true,
    "notify": {
        "telegram": {
            "enabled": true,
            "bot_api_key": "APIKEY",
            "chat_id": "CHATID",
            "message_template": "GoDNS Service:%0ADomain {{ .Domain }} is updated to%0A{{ .CurrentIP }}",
            "use_proxy": false
        }
    }
}

Expected behavior Last week it worked without issue, but today I could not get to update my IPv6 via GoDNS.

Environment:

Additional context
I can still update via https manually: https://www.duckdns.org/update?domains=SUBDOMAIN&token=TOKEN&ipv6=MYIPV6&verbose=true I changed to different ipv6_url and cloudflare resolver, and two different subdomains. Always error msg=NXDOMAIN

Thank you!

ThisIsCyreX commented 2 years ago

The error changes if I set a IPv4 in the DuckDNS Dashboard (left cell): image

If I now try to update the IPv6 with GoDNS, the logs are as follows:

level=info msg="GoDNS started, entering main loop..."
level=info msg="Creating DNS handler with provider: DuckDNS"
level=debug msg="currentIP is:MYIPv6"
level=error msg="cannot resolve domain MYSUBDOMAIN.duckdns.org, please make sure the IP type is right"
ThisIsCyreX commented 2 years ago

I guess I found the Bug. If a Subdomain is empty (no IP in v4 and v6), GoDNS won't update and show me the error(s). Manually adding any IPs in both, will fix it. Now GoDNS will update correctly without errors.

TimothyYe commented 2 years ago

@ThisIsCyreX Thanks, I was trying to reproduce this issue. So there is no need to update the code?

ThisIsCyreX commented 2 years ago

No need. Maybe just a note that a fresh DuckDNS subdomain needs an A record manually added (and if applicable also AAAA).

You can try to reproduce it with a fresh subdomain or clear the IPs with this link: https://www.duckdns.org/update?domains=YOURSUBDOMAIN&token=YOURTOKEN&verbose=true&clear=true and after, try to update your IP with GoDNS.

Thank you very much 👍

TimothyYe commented 2 years ago

@ThisIsCyreX Thanks for your feedback.