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

Harder to use for multiple domains (records) simultaneously #25

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

Harder to use for multiple domains (records) simultaneously #25

Chealer opened this issue Dec 19, 2024 · 4 comments

Comments

@Chealer
Copy link

Chealer commented Dec 19, 2024

The cloudflare-ddns command launches a foreground process which updates a record and exits as soon as the record is up-to-date. However, the package provides infrastructure to keep that record updated in case of future IP address changes, thanks to systemd configuration files which make it behave similar to what a daemon would accomplish, as explained in the README's systemd timer section.

Unfortunately, it is either not possible or not clear how to use that infrastructure to maintain 2 different records (for example, foo.org and bar.org). The configuration file can store 1 token and 1 target record, but it is not clear that it can store more, and using several configuration files basically requires modifying/copying systemd configuration files. As of version 2.1, the configuration file appears to be unspecified.

The Debian package's French description reads:

cloudflare-ddns est un programme ponctuel : exécutez-le, il met à jour les enregistrements DNS et il quitte.

But I assume that is a mistake. The translator must have used plural assuming that several records were supported.

@Tachi107
Copy link
Owner

Hi @Chealer, thank you for opening this issue! Sorry for not replying earlier, but GitHub didn't send me any notification.

Yes, this is a known limitation, as outlined in issue #22. Still, depending on your use case, you may be able to create a single A or AAAA record named ddns.example.org, which is updated by this tool, and multiple CNAME records pointing to it.

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).

Let me know if this fixes your issue!

@Chealer
Copy link
Author

Chealer commented Jan 24, 2025

Hi @Tachi107,

Hi @Chealer, thank you for opening this issue! Sorry for not replying earlier, but GitHub didn't send me any notification.

Not at all, that's still a fast reply by comparison with most projects. But thank you for your care!

Yes, this is a known limitation, as outlined in issue #22. Still, depending on your use case, you may be able to create a single A or AAAA record named ddns.example.org, which is updated by this tool, and multiple CNAME records pointing to it.

Right, this would be a good workaround to document, but it doesn't help with servers which truly serve multiple top-level domains due to CNAME limitations.

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).

For what it's worth, I do not really see how this constitutes a problem (unless you mean it causes more work to be needed for implementation), but thanks for sharing.

Let me know if this fixes your issue!

To clarify, this is not "my issue" just because I reported it. I already worked around the difficulty this caused on my server.

@zejjnt
Copy link

zejjnt commented Apr 2, 2025

Yeah this had me troubleshooting for waaaay too long, so thank you for making this issue as it helped me greatly.
I had two [ddns] entries in config.ini which gave me the error
"Error getting the Zone ID"
which is very much not helpful.

When using the program as a service it refuses to run with arguments for some reason, but as I am not very familiar with C++ I cannot troubleshoot that.

Hope there will be some way to implement additional entries in the config.ini, thanks for an otherwise good application :)

@Chealer
Copy link
Author

Chealer commented Apr 2, 2025

I just realized that my TLS certificate had been expired since 2025-03-31. (certbot had been failing to renew due to an outdated IP address for 30 days. In fact, philippecloutier.com's address had been outdated since at least 2025-01-31, but I hadn't realized since the domain itself is secondary.)

I thought I has this worked around thanks to the /etc/ppp/ip-up.d/cloudflare-dns-philippecloutier script I created, but in fact, the public IP address is only on the modem, so the ip-up.d script is useless. An effective workaround for our server was to use a cron job instead.

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

3 participants