OPNsense Forum

English Forums => General Discussion => Topic started by: verfluchten on March 12, 2025, 11:52:07 PM

Title: SRV record in unbound
Post by: verfluchten on March 12, 2025, 11:52:07 PM
For some reason, the SRV record that I set up for XMPP clients is not working. I added to upbound custom options:

local-data: "_xmpp-client._tcp.local.domain. 86400 IN SRV 0 5 5222 mail.local.domain."

But when I query it it times out:

$ nslookup _xmpp-client._tcp.local.domain -type="SRV"
;; communications error to 10.0.0.1#53: timed out
;; communications error to 10.0.0.1#53: timed out
;; communications error to 10.0.0.1#53: timed out
;; no servers could be reached

The address record that it points to queries instantaneously:

$ nslookup mail.local.domain -type="A"
Server:        10.0.0.1
Address:    10.0.0.1#53

Name:    mail.local.domain
Address: 10.0.0.2

$

Did I do something wrong?

Many thanks!
Title: Re: SRV record in unbound
Post by: dseven on March 13, 2025, 08:44:03 AM
(possibly depending on what you're running nslookup on) the options must come before the name to be looked up, so try `nslookup -type="SRV" _xmpp-client._tcp.local.domain`

Failing that, where did you place your custom record?
Title: Re: SRV record in unbound
Post by: verfluchten on March 17, 2025, 10:20:07 PM
There is only one place in OS to enter custom options for Unbound.
My nslookup takes type where I put the option.
Title: Re: SRV record in unbound
Post by: dseven on March 18, 2025, 09:37:23 AM
Quote from: verfluchten on March 17, 2025, 10:20:07 PMThere is only one place in OS to enter custom options for Unbound.

You originally asked "Did I do something wrong?", then you come out with this, like you know it all. If you're not willing to describe exactly what you did (and expected to work), anyone trying to help can only guess.

AFAIK support for custom options through the OPNsense web UI was removed in the 21.7 release. You didn't actually specify what release you're running.

AFAIK the only place to add a SRV record would be a file in /usr/local/etc/unbound.opnsense.d/ . Is what what you've done or not?
Title: Re: SRV record in unbound
Post by: cookiemonster on March 18, 2025, 02:10:29 PM
@dseven . Custom options can be added by the UI (without validation, that is left for the user AFAIK) with the addition of the maxit custom options. OP hasn't said it but I imagine that's how's done it.
Title: Re: SRV record in unbound
Post by: dseven on March 18, 2025, 04:58:29 PM
Ahhh, a community plugin. Could be. So it turns out there are at least two ways to add custom records!
Title: Re: SRV record in unbound
Post by: cookiemonster on March 18, 2025, 05:36:27 PM
that's right.
Title: Re: SRV record in unbound
Post by: verfluchten on March 20, 2025, 09:10:13 PM
It worked as soon as I uninstalled the community plugin and deleted its conf file.