fernwerker / ownDynDNS

Self-hosted dynamic DNS php script for FRITZ!Box and netcup DNS API
GNU General Public License v3.0
138 stars 35 forks source link

Value in field domainname does not match requirements of type: domainname #3

Closed a5464c9f32 closed 5 years ago

a5464c9f32 commented 5 years ago

Hi,

I am trying to update the dns records of abc.com, with this script being Hosted on def.com. Both are on netcup. def.com uses the default dns settings, abc.com is just used for dyndns and I want to forward all traffic via A and AAAA records.

When I call the script normally, I get the following error: Fatal error: Uncaught SoapFault exception: [4012] Validation Error. Value in field domainname does not match requirements of type: domainname.

Further down in the debug output it says: DomainWebserviceSoapClient->infoDnsRecords('com', .......

Looking into the code, I don’t understand why the function reduceHost() is used for the domainname argument. It returns only the tld. If I change the the domain argument to nonexistingsubdomain.abc.com the output changes to : DomainWebserviceSoapClient->infoDnsRecords('abc.com', .......

And Fatal error: Uncaught SoapFault exception: [5029] Can not get DNS records for zone. Domain abc.com verwendet externe Nameserver.

Which sounds correct because I am still using external nameservers until I am relatively confident that the script will correctly update the dns values. I am using the service behind the domain and would like to avoid downtime.

Is the behavior normal and should I just change the domain parameter Domainname in my Fritzbox to nonexistingsubdomain.abc.com and expect it to work or am I doing something wrong? Any help would be great, thank you for writing this very useful script!

a5464c9f32 commented 5 years ago

I got the script to work for me by using nonexistingsubdomain.abc.com and hardcoding the @ and * hostnames that i wanted to be updated in the section where IPv4/6 A/AAAA records are read/updated.

fernwerker commented 5 years ago

Sorry for the late response. Not sure if I get this right: You try to use the script for the second level domain (e.g. example.com) and not for a host on the third level (e.g. host1.example.com)?

The script was designed for usage in third level but actually I'd like to add some functionality for multi-tenant usage, and multiple DNS management. I'm just pretty short on time in the moment.