stecklars / dynamic-dns-netcup-api

A simple dynamic DNS client written in PHP for use with the netcup DNS API.
MIT License
178 stars 55 forks source link

Support multiple domains #4

Closed MrJackJonesIII closed 2 years ago

MrJackJonesIII commented 6 years ago

Hi, thank you very much for your script. I just installed it and it worked right away without any hassle. I'm wondering how to set up updating multiple subdomain on different domains though. If I get it right the logic of the config.php doesn't provide that. Or am I supposed to use multiple folders with their own configs for different subdomains and call their update.php's with their own cron jobs?

For clarification, I want to update subdomains like this from one machine: aaa.bbbbb.de ccc.ddddd.de

Thank you again

MrJackJonesIII commented 6 years ago

Oh and while testing I am wondering how to set up multiple subdomains on the same domain as well... Going for: aaa.bbbbb.de bbb.bbbbb.de

stecklars commented 6 years ago

Hi there,

Thanks for using my script.

At the moment, both use cases you mention aren‘t implemented, but I‘ll work on it soon.

For both cases it might be possible to use a CNAME record, so that the subdomain is linked to another domain. Please note however that you must not create a CNAME on the main domain (without a subdomain, for example mydomain.de) and no other records for a subdomain that has a CNAME may exist.

A config like this might look like the following in the netcup CCP:

mydomain.de:

Host | Type | MX | Destination dyndns | A | | [Your IP, Managed by the script] anothersubdomain | CNAME | | dyndns

mydomain2.de:

Host | Type | MX | Destination dyndns | CNAME | | dyndns.mydomain.de

If you can‘t use a CNAME (for example because you want to use it on the main domain without subdomain or you want to have additional records for the subdomain) then I would just run multiple instances of the script, as suggested by you. I‘ll implement support for this soon probably though.

Let me know if this helps. I‘ll keep this issue open to track progress of implementing this.

MrJackJonesIII commented 6 years ago

Ok, cool. Thank you! Let me know if I can help with testing. I'll go with your cname solution in the meantime.

MoriarT3a commented 5 years ago

Hi Lars, I hope you'll work on this again. It were beautyfull if the script setzt Wildcard ("*") and Domain Root ("@") at the same time. Or is it implemented and I didn't get it?

Greetings!

nik15225 commented 4 years ago

Hi. Thank You for your Script. Please let us know, when it will be possible to add MX entrys

stecklars commented 2 years ago

This feature is now provided in the newest release 3.0: https://github.com/stecklars/dynamic-dns-netcup-api/releases/tag/v3.0

stecklars commented 2 years ago

Hi. Thank You for your Script. Please let us know, when it will be possible to add MX entrys

@nik15225 I am not sure, why this would be necessary. MX records always point to a domain, not an IP address. You would therefore set my script to work on a subdomain, for example mail.yourdomain.com and then point the MX of the domain of your choice to mail.yourdomain.com.