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

RFC2136 not updating DNS when address changes #2752

Closed
NOYB opened this issue Jan 14, 2022 · 4 comments
Closed

RFC2136 not updating DNS when address changes #2752

NOYB opened this issue Jan 14, 2022 · 4 comments
Labels
help wanted Contributor missing incomplete Issue template missing info

Comments

@NOYB
Copy link
Contributor

NOYB commented Jan 14, 2022

When address changes everything seems to update locally as it should (wanip, cached ip, etc). But no update is sent to the DNS server. I know the DNS update works because RFC2136 Edit Save & Force Update sends the update as expected and DNS then resolves to the new address.

It appears as though mwexec_bg($cmd); on line 233 in /usr/local/etc/inc/plugins.inc.d/rfc2136.inc may be the culprit. Executing the resulting command in console shell or via the RFC2136 Edit Save & Force Update works. But if triggered by a newwanip it does not work.

How to reproduce. Get the lease to expire and obtain a new address.

Actual result: DNS record NOT updated.
Expected result: DNS record updated.

OPNsense 21.7.7 (amd64, LibreSSL)

@OPNsense-bot
Copy link

Thank you for creating an issue.
Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

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

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

@OPNsense-bot OPNsense-bot added the incomplete Issue template missing info label Jan 14, 2022
@NOYB
Copy link
Contributor Author

NOYB commented Jan 15, 2022

UPDATE:
rfc1236.inc:233 mwexec_bg($cmd); does not seem to work when rfc2136_configure_do() is called from plugins.inc:274 call_user_func_array($argf, array_slice($args, 0, $argc)); (newwanip triggered)

Works fine though when rfc2136_configure_do() is called from rc.rfc2136:42 (save and force update triggered)

@NOYB
Copy link
Contributor Author

NOYB commented Jan 16, 2022

UPDATE:
/var/etc/nsupdatecmds0:

server NS1.DomainName.com
update delete ZF.DynDNS.DomainName.com. A
update add ZF.DynDNS.DomainName.com. 60 A 99.x.x.x

cmd:
/usr/local/bin/nsupdate -k /var/etc/K0DynDNS.DomainName.com.+157+00000.key /var/etc/nsupdatecmds0

exit code: 1
stderr: "couldn't get address for 'NS1.DomainName.com': not found","syntax error"

The "syntax error" doesn't seem to make sense because the command works perfectly from the command prompt.

Workarround:
Adding an unbound override for NS1.DomainName.com works around the issue.

@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 Jul 13, 2022
@OPNsense-bot OPNsense-bot added the help wanted Contributor missing label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributor missing incomplete Issue template missing info
Development

No branches or pull requests

2 participants