ddns-updater
ddns-updater copied to clipboard
Bug: Porkbun old records not overridden
DNS resolution records can be updated, but the old ones will not be overwritten, and new ones will always be added. Make it unable to take effect
this is my config.json
"settings": [
{
"provider": "porkbun",
"domain": "domian",
"host": "@",
"api_key": "***",
"secret_api_key": "***",
"ip_version": "ipv4"
},
{
"provider": "porkbun",
"domain": "domian",
"host": "*",
"api_key": "***",
"secret_api_key": "***",
"ip_version": "ipv4"
}
]
}
Indeed, I think the implementation was not actually tested by anyone 😄 It should be fixed now, please pull the latest image (once this build is done in 5 minutes) and try again. Thanks!
thank you for fix it .the first-level domain can be replaced normally, but the pan-domain name will still be added, such as *.yefenghu.xxx have Duplicate DNS resolution
So the bug is still occurring right? I'll check again tomorrow.
yes,The top-level domain is correct, there are still problems with subdomains
Try with:
docker run -it --rm alpine:3.14
apk add curl
curl -X POST -d '{"secretapikey": "YOURSECRETAPIKEY", "apikey": "YOURAPIKEY"}' https://porkbun.com/api/json/v3/dns/retrieveByNameType/YOURDOMAIN/A/YOURSUBDOMAIN
exit
(Replacing YOUR*
values with your own)
What results do you get? You should get at least one record:
{"records": [{"id": "some id", "otherfields": "..."}]}
Just a small reminder 😉 Thanks!!
You are the most aggressive maintenance developer I've ever seen, although the pan-domain still has duplicate resolution issues
Haha I'll take that as a compliment 😄 You know, just tryin' to burn some issues!
And I would need you to run that curl command in the comment above (here) please. It can wait a few days, no pressure 😉
Sorry, I forgot about it. the link https://porkbun.com/api/json/v3/dns/retrieveByNameType/YOURDOMAIN/A/YOURSUBDOMAIN Can the YOURSUBDOMAIN in exit be in the form of *.domain.com?
Maybe, Try replacing YOURSUBDOMAIN
with *
, the URL would look like https://porkbun.com/api/json/v3/dns/retrieveByNameType/example.com/A/*
this is command:
curl -X POST -d '{"secretapikey": "sk1_***", "apikey": "pk1_***"}' https://porkbun.com/api/json/v3/dns/retrieveByNameType/mydomain/A/*
the results is :
<!DOCTYPE html>
<html lang="en">
<head>
<title>Error</title>
<style type="text/css">
::selection{ background-color: #E13300; color: white; }
::moz-selection{ background-color: #E13300; color: white; }
::webkit-selection{ background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1>An Error Was Encountered</h1>
<p>The URI you submitted has disallowed characters.</p> <p>You can probably find what you're looking for on our <a href="/">homepage</a>.</p>
</div>
</body>
</html>
🤔 I guess you can't specify *
in the URL. That might be a bug on their API, since you can't retrieve the wildcard record.
I'll modify the code to retrieve all records for the domain so that we could have the wildcard host too. Maybe try:
curl -X POST -d '{"secretapikey": "sk1_***", "apikey": "pk1_***"}' https://porkbun.com/api/json/v3/dns/retrieveByNameType/mydomain/A/
Do you get all the records including the wildcard one?
Also is the problem now only about wildcard records or all subdomains? Thanks!!
i have try wildcard and domain,subdomains i never setting.need to try subdomains?
there are still problems with subdomains
You said subdomains, so is it just a problem with wildcards or with all subdomains?
Also please try that curl command mentioned https://github.com/qdm12/ddns-updater/issues/247#issuecomment-945237981 see how your wildcard record is in the response so I can fix the wildcard.
https://github.com/qdm12/ddns-updater/issues/247#issuecomment-945072283 thisi my wildcard record response .i have not use curl command test subdomains.
#247 (comment) thisi my wildcard record response .i have not use curl command test subdomains.
Yes but try the same command by removing the suffix *
at the end of the url (see comment above https://github.com/qdm12/ddns-updater/issues/247#issuecomment-945237981)
root@OpenWrt:~# docker run -it --rm alpine:3.14
Unable to find image 'alpine:3.14' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:42435->[::1]:53: read: connection refused.
i try the same command by removing the suffix * at the end .
{"status":"SUCCESS","cloudflare":"disabled","records":[{"id":"168081851","name":"mydomain","type":"A","content":"IP","ttl":"600","prio":"0"}]}
root@OpenWrt:~# docker run -it --rm alpine:3.14 Unable to find image 'alpine:3.14' locally docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:42435->[::1]:53: read: connection refused.
Oh-oh that's strange, maybe your DNS is blocking docker hub?
i try the same command by removing the suffix * at the end .
{"status":"SUCCESS","cloudflare":"disabled","records":[{"id":"168081851","name":"mydomain","type":"A","content":"IP","ttl":"600","prio":"0"}]}
Ugh so they only return the record for host @
I guess.
EDIT: Or do you actually see e.g. "name": "*.mydomain.com"
?? ⁉️
I have no idea how to get the wildcard record then. Maybe contact their support about it? 🤔 It might be a bug since it looks like they disallow *
character in the URL (The URI you submitted has disallowed characters
).
If they don't want to fix it, the alternative would be to set your record id as an additional field for wildcard hosts. Actually can you find the record ID of your wildcard host from their web UI or anywhere??
Any update on this?
I guess not. For me porkbun is working, but I am not using wildcard.
In their documentation they mention only if you use "DNS Edit Record by Domain and ID" you can use wildcard. NOT with subdomain.
So this behaviour as @yefenghu mentioned is intended.
Closing this due to inactivity and response from @esackbauer (thanks btw)