mrikirill / SynologyDDNSCloudflareMultidomain

Synology DDNS Cloudflare service provider with multidomains and subdomains
https://mrikirill.github.io/SynologyDDNSCloudflareMultidomain/
MIT License
465 stars 65 forks source link

"Unable to perform this operation" error #42

Closed jasonlakez closed 2 months ago

jasonlakez commented 2 months ago

Seems it's the problem in the NAS configuration. Issue started after a IP change. Was working perfectly until yesterday.

Untitled

priitliivak commented 2 months ago

Root cause seems to be: :"PATCH method not allowed for the api_token authentication scheme" I initially thought this is due to incorrect auth token scope but I was wrong.

The script tried to update AAAA records although I had A records with ipv4 configured. Input parameter for the script was also ipv4 address. When I updated all my DNS records in Cloudflare to ipv6 the script worked but I would really prefer to use ipv4

gozzilli commented 2 months ago

Found the same issue on a new install -- first time I use the tool.

mrikirill commented 2 months ago

The script doesn't use IPv4 that Synology provides as arguments. Instead of, it requests https://api64.ipify.org?format=json which returns an external IPv4 or IPv6 and than based on the logic it tries to update the A record for IPv4 OR the AAAA record for IPv6. Technically this can cause an issue if a zone has an A record but ipify returns an IPv6 address. Looks like it needs to be a param probably by default use IPv4 with param select IPv6 Do you agree ?

mrikirill commented 2 months ago

Hey guys,

The script didn't cover case with both records A and AAAA Made the update -> https://github.com/mrikirill/SynologyDDNSCloudflareMultidomain/pull/45

priitliivak commented 2 months ago

Works great. Thanks for the update.

gozzilli commented 2 months ago

Same. Thank you!