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

ddclient: netcup only supports one level subdomain #3966

Closed
3 tasks done
Sduniii opened this issue May 6, 2024 · 3 comments · May be fixed by #4268
Closed
3 tasks done

ddclient: netcup only supports one level subdomain #3966

Sduniii opened this issue May 6, 2024 · 3 comments · May be fixed by #4268
Labels
help wanted Contributor missing

Comments

@Sduniii
Copy link

Sduniii commented May 6, 2024

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

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:

  1. Go to 'Service->Dynamic DNS->Settings'
  2. Click on 'Add'
  3. Enter a Hostname with multiple subdomains *.subdomain.mydomain.com
  4. 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).

@DiSHTiX
Copy link

DiSHTiX commented May 22, 2024

I think the core of this issue is same as i'm having. #3712
A ticket has just been raised

ddclient/ddclient#673

@Sduniii
Copy link
Author

Sduniii commented Sep 28, 2024

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

@OPNsense-bot
Copy link

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository,
please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue,
just let us know, so we can reopen the issue and assign an owner to it.

@OPNsense-bot OPNsense-bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2024
@OPNsense-bot OPNsense-bot added the help wanted Contributor missing label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributor missing
Development

Successfully merging a pull request may close this issue.

3 participants