Srv record not working since update to 6.0

Hi, i updated my pihole from 5 to 6 and noticed that a
nslookup -type=srv _vlmcs._tcp
is giving me a NXDOMAIN

the log give me a

dnsmasq[1431]: query[SRV] _vlmcs._tcp from 192.168.0.216
dnsmasq[1431]: forwarded _vlmcs._tcp to 1.1.1.1

though i have set misc.etc_dnsmasq_d to true
and my /etc/dnsmasq.d/99-dhcp-options.conf is still the one i had before with
srv-host=_vlmcs._tcp,192.168.0.200,1688
and a few other cusom entries

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or if you run your Pi-hole as a Docker container:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

Attachment Removed for Privacy

i added it here as the tricorder.pi-hole.net gave me a 400 error

//EDIT: had to censor my hosts list as a few names were showing too many private details

Having the same issue, cannot get pihole SRV record working, have this in my config :
srv-host=_vlmcs._tcp,192.168.1.200,1688
srv-host=_vlmcs._tcp.local,192.168.1.200,1688

This looks like a custom dnsmasq configuration file, which Pi-hole v6 would only read when configured to do so.

See Custom dnsmasq configs not loading

At least for me:
i have set misc.etc_dnsmasq_d to true
And other entries in my /etc/dnsmasq.d/99-dhcp-options.conf are working. Only the srv record is not working.
And the file was not change since many month and worked great before the v6 update.

What's the output of:

ls -lah /etc/dnsmasq.d

root@DietPi1:~# ls -lah /etc/dnsmasq.d
-rw-r--r-- 1 root root 80 Mar 10 11:13 10-srv-records.conf

I tried both options, either enabling loading the "old" dnsmasqd files and manually putting in one line, neither works

Are you sure that's run from the correct machine?
Where's your 99-dhcp-options.conf?

I don't use pihole as DHCP server, my windows machine is contacting the correct IP for pihole but no dice :
PS C:\Users\admin> nslookup -type=srv _vlmcs._tcp
Server: pi.hole
Address: 192.168.1.200

*** pi.hole can't find _vlmcs._tcp: Non-existent domain

I think you are confusing me with the other user.
I was the one who opened the thread and i have that file. and you can get all info from my attached log.
but i guess the other user who is answering instead of my to questions to me has the same problem. Tho his filename is different.
I have rn not access to my machine as i'm not at home,
But there is only my 99-dhcp-options.conf in that dir with 644 permission.
And as said, other entries from that file are working
And yes, i am sure i asked from the right machine(s) and as you can see in my first post pihole/dnsmasq is reacting to it by forwarding the request to 1.1.1.1

Sorry for hijacking the thread but indeed, same issue! And if honestly, I didn't check the log of dnsmasq. Will do and report later

OK, I checked the logs :
/var/log/pihole/pihole.log:Mar 11 10:02:07 dnsmasq[415]: query[SRV] _vlmcs._tcp from 192.168.1.28
/var/log/pihole/pihole.log:Mar 11 10:02:07 dnsmasq[415]: forwarded _vlmcs._tcp to 127.0.0.1#5335
/var/log/pihole/pihole.log:Mar 11 10:02:07 dnsmasq[415]: reply _vlmcs._tcp is NXDOMAIN
/var/log/pihole/pihole.log:Mar 11 10:02:07 dnsmasq[415]: query[SRV] _vlmcs._tcp from 192.168.1.28
/var/log/pihole/pihole.log:Mar 11 10:02:07 dnsmasq[415]: cached _vlmcs._tcp is NXDOMAIN

cat /etc/dnsmasq.d/10-srv-records.conf
srv-host=_vlmcs._tcp,192.168.1.200,1688

I tried both options, enabling misc.etc_dnsmasq_d as well as disabling that option and entering the line in the box misc.dnsmasq_lines

Luckily my pi-hole is running on a VM, i restored backup from before the upgrade to V6 and with V5 it's working again

Update : I cannot add another reply to this topic but it's clear I need to add a domain name. Suppose the domain that my router is adding is mydomain.com would the following be correct?

srv-host=_vlmcs._tcp.mydomain.com,192.168.0.200,1688

Ok, so your custom records are these:

srv-host=_vlmcs._tcp,192.168.0.200,1688
address=/vlmcs/vlmcs.box/192.168.0.200
I did verify that they've worked with v5 (edit: click to see why)

I took a look at dnsmasq's documentation for serv-host, where <domain> matches the RFC's Name:

-W, --srv-host=<_service>.<_prot>.[],[[,[,[,]]]]
Return a SRV DNS record. See RFC2782 for details. If not supplied, the domain defaults to that given by --domain.

--domain matches v6's dns.domain, but where Pi-hole v6 would populate that option by default, it may well have been empty in Pi-hole v5, unless you'd manually set it or enabled Pi-hole's DCHP server.
So in v6, the resulting SRV record would be _vlmcs._tcp,box, where in v5 it may have been that as well, or _vlmcs._tcp.


RFC 2782 defines SRV records as having the following structure:
_Service._Proto.Name TTL Class SRV Priority Weight Port Target

The service record you've created just has _Service._Proto, lacking Name.

That Name should be the domain name for which this record is valid, i.e it should match your local domain.

Your debug log shows that to be box:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 6 seconds)
   Scanning all your interfaces for DHCP servers and IPv6 routers
   
   * Received 301 bytes from 192.168.0.198 @ eth0
     Offered IP address: 192.168.0.207
     DHCP options:
      Message type: DHCPOFFER (2)
      domain-name: "box"
      dns-server: 192.168.0.2
      dns-server: 192.168.0.198
      router: 192.168.0.1

This also must match the dns.domain configured for Pi-hole, which it does in your case:

 -rw-r--r-- 1 pihole pihole 54K Feb 27 01:40 /etc/pihole/pihole.toml
   [dns]
     domain = "box" ### CHANGED, default = "lan"

Please try:

srv-host=_vlmcs._tcp.box,192.168.0.200,1688

Never needed the domain before. Was also not in the Microsoft documentation. Or better it was said not needed if i remember right.
But ok, i tried it now with

srv-host=_vlmcs._tcp.box,192.168.0.200,1688

but
still

Server:		192.168.0.2
Address:	192.168.0.2#53

** server can't find _vlmcs._tcp: NXDOMAIN

and

Mar 11 11:59:37 dnsmasq[346198]: query[SRV] _vlmcs._tcp from 192.168.0.177
Mar 11 11:59:37 dnsmasq[346198]: forwarded _vlmcs._tcp to 1.0.0.1
Mar 11 11:59:37 dnsmasq[346198]: reply _vlmcs._tcp is NXDOMAIN

ofc with
nslookup -type=srv _vlmcs._tcp.box
it works.
Have to check later if it works for devices to automatically find the server

Edit: can confirm, it works.
Thank you for your help.

Clients are expected to request a SRV record scoped for their local/search domain, as that is the domain where they try to locate a service.

Some routers may not propagate a local domain, in which case a plain _vlmcs._tcp would work.

On a side note:
Do you really need that /address/ entry, or wouldn't a host-record be a better choice?

address resolves vlcms/vlmcs.box as well as all *.vlmcs/*vlmcs.box subdomains to 192.168.0.200, but with a very short TTL, potentially prompting clients to resolve it in quick succession.

host-record would define resolution for just vlcms and vlmcs.box, but would alllow you to control the record's TTL, e.g. for 15 minutes=900 seconds:

host-record=vlmcs,vlmcs.box,192.168.127.200,900

:thinking:
oh. yes. This is better.
Thank you again.

Forgive my ignorance but I do not understand the 'box' part. what would be the correct syntax if the router gives mydomain.com ? Something like this :
srv-host=_vlmcs._tcp.mydomain.com,192.168.1.200,1688

Can I have multiple SRV lines so the lookup will work for several possible queries without fail i.e.
srv-host=_vlmcs._tcp,192.168.1.200,1688
srv-host=_vlmcs._tcp.local,192.168.1.200,1688
srv-host=_vlmcs._tcp.mydomain.com,192.168.1.200,1688