DDNS and multiple domains

Currently reading
DDNS and multiple domains

4,063
1,394
NAS
DS4l8play, DS202j, DS3623xs+, DSM 7.3.3-25847
I just acquired a second domain, and I am seeking a "best practice" to keep my IP updated on both domains.

Both domains are registered with Cloudflare. With "domain1" I set up a Cloudflare DDNS updater which uses my API token to communicate IP updates to Cloudflare.

With the second domain (domain2), I thought about spinning up a second container specifically for domain2. But that got me wondering if I could just use "domain1" as my reference IP in the "domain2" DNS settings on Cloudflare, because domain2 likely has its own unique API key.

Maybe there's a better way to do this. If I had ten domains, I would not want 10 containers running expressly to keep my single IP address current.

What's the better way to handle this? Thanks!
 
I use the DSM ddns functionality using the script below. I haven't tried but I guess adding an additional entry to the ddns updater with the new api key should be possible:


Beware: this modification needs to be re-done on every DSM update, you can store the script on a folder that does not get "refreshed" but the modification to /etc.defaults/ddns_provider.conf will be removed.

The same developer has a docker container also (but I haven't tried it), there it seems to be easy to set up a second domain:

As for what's better, updating the ip of the second domain or using a CNAME entry to the first one, I guess that depends on what you need to do: if every subdomain is ultimately going to the same ip and all your subdomains use (or don't use) the cloudflare proxy I guess it's just easier to do and maintain the CNAME thing.
 
Last edited:
Use one main DDNS domain A-record entry and create as many CNAME-record entries like you need and point them to the A-record domain.
So would I enter "domain2.com" as a CNAME to "domain1.com"?

Would I also enter "*.domain2.com" as a CNAME to "domain1.com"?

If so, I would deregister "domain2.com" from Cloudflare? Yes?

How would certs then work for "domain2.com"? Would I need to do that manually, since it is under the "domain1.com" Cloudflare account?

Thank you!
I use the DSM ddns functionality using the script below.
Thank you. I'll read more into this. I've been looking to migrate to this Docker as well. More homework ahead.
 
I assume both domains are managed in CF.

In the domain "domain2.com", the *-entry would be CNAME Records that point to domain1.com (or whatever subdomain you use for the ddns update). I am not sure if the @-entry can be a CNAME Record as well.

- LE HTTP-Challenge: the client will try to access the tokenfile using the domain the certificate should be issued for. This will work right out of the box, regardless if the certificate should be issue for domain1. com or domain2.com, as long as the CNAME points to an A-Record that points to the correct ip.

- LE DNS-Challenge: the txt record with the token will be/needs to be added in the authoritative dns zone, which for domain1.com certificates is still the dns zone for domain1.com. For domain2.com certificates the dns zone for domain2.com still remains domain2.com.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I'll second this EXCEPT I'll say "So I learned not to do any major changes or updates unless *my husband...
Replies
5
Views
2,800
We lived in Skokie, with Comm Ed for power... Here in Mountains we learned within 2 weeks that we were...
Replies
5
Views
1,314
As soon as my Internet connection will allow it I will yes, but I have this setup for a while already as...
Replies
8
Views
2,268

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top