Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated record(s) unspecified #26

Open
Chealer opened this issue Dec 19, 2024 · 2 comments
Open

Updated record(s) unspecified #26

Chealer opened this issue Dec 19, 2024 · 2 comments

Comments

@Chealer
Copy link

Chealer commented Dec 19, 2024

Calling cloudflare-ddns generally (and probably always, as of 2.1) updates a single resource record. However, documentation does not specify which record a call update.

The example from Ubuntu's manual page suggests the updated record is the record with the specified record name and type A (the IPv4 address).

@Tachi107
Copy link
Owner

Hi Philippe, cloudflare-ddns tries to automatically do the Right Thing™.

If you set record_name to ddns.example.org, and ddns.example.org has both A and AAAA records, the tool will update both of them. If the tool is unable to get both IPv4 and local IPv6 addresses when the record_name points to both A and AAAA records, the tool will exit with an error.

In other words:

  • if your server is in an IPv4-only network, only create an A record.
  • if your server is in an IPv6-only network, only create an AAAA record.
  • if your server is in a dual-stack network, either create an A or AAAA record, or both.

If this explanation makes sense to you, I'll document it in the manual page and/or README file.

@Chealer
Copy link
Author

Chealer commented Jan 25, 2025

Thank you @Tachi107, both the explanation and the behavior do make sense and I am glad that it behaves this way, although:

  1. I am surprised by the dual-stack network behavior given your assertion in ticket Harder to use for multiple domains (records) simultaneously #25 that "It is not possible to update multiple records in a single atomic operation using Cloudflare's API, which is the main reason why I didn't add this feature (yet)."
  2. If the behavior is indeed to update potentially more than a single record, then the README needs rectification in the following sentences.

It uses Cloudflare's API to update a given DNS record when needed.

This tool is a oneshot program: you run it, it updates the DNS record, and it terminates.

you can pass the API Token and the record name as command line arguments or you can use a ini configuration file, tipically located in /etc/cloudflare-ddns/config.ini, by passing no arguments at all

By the way, "tYpically" is spelled with a "y".

@Chealer Chealer changed the title Updated record unspecified Updated record(s) unspecified Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants