plugins
plugins copied to clipboard
ddclient: netcup only supports one level subdomain
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
- [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- [x] The title contains the plugin to which this issue belongs
Describe the bug infoDnsZone failed with status error. response: {'serverrequestid': '', 'clientrequestid': '', 'action': '', 'status': 'error', 'statuscode': 4013, 'shortmessage': 'Validation Error.', 'longmessage': 'Value in field domainname does not match requirements of type: domainname. ', 'responsedata': ''}
(https://github.com/opnsense/plugins/blame/da53031f7fe8f4fe26511164780819d9d0b52d69/dns/ddclient/src/opnsense/scripts/ddclient/lib/account/netcup.py#L67) It is not possible to add a domain like *.subdomain.mydomain.com, for example.
To Reproduce Steps to reproduce the behavior:
- Go to 'Service->Dynamic DNS->Settings'
- Click on 'Add'
- Enter a Hostname with multiple subdomains *.subdomain.mydomain.com
- See error in Log
Expected behavior DNS entry for "*.subdomain" should be updated to current ip.
Possible Fix
self.domain = self.settings['hostnames'].split('.', self.settings['hostnames'].count('.')-1)[-1]
self.hostname = self.settings['hostnames'].rsplit('.', 2)[0]
Environment OPNsense 24.1.6 (amd64).
I think the core of this issue is same as i'm having. #3712 A ticket has just been raised
https://github.com/ddclient/ddclient/issues/673
No, this not solved the problem. Here is a script for fixing after every update:
#!/bin/bash
sed -i '' "s/self\.hostname, self\.domain = self\.settings\['hostnames'\]\.split('\.', 1)/#self\.hostname, self\.domain = self\.settings\['hostnames'\]\.split('\.', 1)\\
self\.domain = self\.settings\['hostnames'\]\.split('\.', self\.settings\['hostnames'\]\.count('\.')-1)\[-1]\\
self\.hostname = self\.settings\['hostnames'\]\.rsplit('\.', 2)\[0]/g" /usr/local/opnsense/scripts/ddclient/lib/account/netcup.py