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

Support for multiple records [Reference @jeidnx comment on 24th Jan] #57

Open
Jeidnx opened this issue Jan 24, 2023 · 10 comments
Open

Support for multiple records [Reference @jeidnx comment on 24th Jan] #57

Jeidnx opened this issue Jan 24, 2023 · 10 comments
Labels
enhancement New feature or request Untested Features New features implemented by the public that is not tested. Use with your own discretion

Comments

@Jeidnx
Copy link

Jeidnx commented Jan 24, 2023

Hey there,
Should this project support updating multiple records? This would involve either changing the record_name variable to record_names or having a second variable for multiple records altogether, although i don't see the point in that. I have already implemented this in a custom version of this script i use here.

@Wizman87
Copy link

Wizman87 commented Feb 14, 2023

Wouldn't using a CNAME be more ideal than updating multiple records, all at once? Also, running multiples of the same script would achieve the same result for different records, zones, and domains. Thoughts?

@Wizman87
Copy link

Wizman87 commented Feb 14, 2023

Duplicate of #40, #33, and #22. Please be sure to review these other closed issues for alternative solutions and additional related discussion topics.

@Jeidnx
Copy link
Author

Jeidnx commented Feb 16, 2023

None of these issues where closed with an answer as to whether this script should support multiple domains, they are all just workarounds. This issue is intended to be a discussion about exactly this.

Some of my thoughts:
Yes, using a CNAME is probably the best solution for most if not all cases. I personally just really dislike using CNAMEs, as they often lead to unintended behavior in my experience.
Running multiples of the same script is also a valid solution (which, unlike my referenced implementation, works across multiple cloudflare zones), but I would much prefer having all the dns related things in a single file.

In my opinion adding multi domain support is unnecessary for this project. You already pointed out two good solutions to this problem.

My intention was to give a definitive yes or no answer to the question if this project will ever support multiple domains or not. I suggest we wait for @K0p1-Git to be available again to hear his thoughts on this.

@Jeidnx Jeidnx changed the title [Discussion] add support for multiple records [Discussion] Should this project add support for multiple records? Feb 16, 2023
@K0p1-Git
Copy link
Owner

My intended use case for this script was for a simple home server and thus created a script that can be easily used and lightweight. I'll keep this issue up for those that share the same need as you, where they would be able to find access to the version of the script you've created. Thanks! @Wizman87

@K0p1-Git K0p1-Git changed the title [Discussion] Should this project add support for multiple records? Support for multiple records [Reference @jeidnx comment on 24th Jan] Aug 20, 2023
@K0p1-Git K0p1-Git added enhancement New feature or request Untested Features New features implemented by the public that is not tested. Use with your own discretion labels Aug 20, 2023
@Neo-ST
Copy link

Neo-ST commented Mar 5, 2024

My intended use case for this script was for a simple home server and thus created a script that can be easily used and lightweight. I'll keep this issue up for those that share the same need as you, where they would be able to find access to the version of the script you've created. Thanks! @Wizman87

Hi,

I'm having a similar but different issue.
I have 2 different domains on Cloudflare and I have 2 physically separate web servers that I wanted to connect to those domains.
I succeeded to connect the 1st one, and script is working nicely.

But it won't update the 2nd server's IP addresses to Cloudflare.

Bear in mind I don't have subdomains, I have 2 separate .com domains in my Cloudflare account.

In each, I created "A" DNS record.

The one thing I noticed could be causing problems is "Global API key".
Zone identifiers for these 2 domains are different, but Global API key is the same, so I think that's what's confusing the script, because it successfully always updates only the 1st domain, while 2nd one never gets updated.

Is there a workaround to this?

Thanks for your time and work!

@Sailboat265
Copy link
Contributor

Sailboat265 commented Mar 6, 2024

@Neo-ST Hello! You should actually start a new issue thread for this.

But never mind! Alright back to your problem. Sorry, I can't test this out because I don't have more than one domains on Cloudflare.

However, ifaik, Global API key should have no problem with this. Because it's just a method of authenticating the request to Cloudflare servers, it shouldn't affect the response outcome.

I assume you're running two scripts already right?
If so, can you please double check the parameters like auth_email, zone_identifier, record_name and etc, on your second script.

I think this could be a misconfiguration issue.

@Neo-ST
Copy link

Neo-ST commented Mar 6, 2024

@Neo-ST Hello! You should actually start a new issue thread for this.

But never mind! Alright back to your problem. Sorry, I can't test this out because I don't have more than one domains on Cloudflare.

However, ifaik, Global API key should have no problem with this. Because it's just a method of authenticating the request to Cloudflare servers, it shouldn't affect the response outcome.

I assume you're running two scripts already right? If so, can you please double check the parameters like auth_email, zone_identifier, record_name and etc, on your second script.

I think this could be a misconfiguration issue.

OMG I'm such an idiot.
Immediately when I saw "auth_email" I remembered I screwed up.
I mistakenly entered another email address instead of one I used to register with Cloudflare, and of course the script couldn't work.
It now works.

Thank you!

@Sailboat265
Copy link
Contributor

@Neo-ST
No worries! It happens to the best of us. Glad the script is working well for you.

If you have time, perhaps can try out introducing IPv6 (cloudflare-templatev6) too? 😆

@Neo-ST
Copy link

Neo-ST commented Mar 6, 2024

@Neo-ST No worries! It happens to the best of us. Glad the script is working well for you.

If you have time, perhaps can try out introducing IPv6 (cloudflare-templatev6) too? 😆

Sure, but to be honest, I'm a newbie to all this.
Not sure what is that template for and do I even need it ?

@Sailboat265
Copy link
Contributor

Oh that script is basically same as (cloudflare-template.sh). But it deals with IPv6 updating specifically.
If your servers don't need IPv6 connectivity, then you don't need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Untested Features New features implemented by the public that is not tested. Use with your own discretion
Projects
None yet
Development

No branches or pull requests

6 participants
@Neo-ST @Wizman87 @K0p1-Git @Jeidnx @Sailboat265 and others