core: dnsmasq: strict-order functionality not working as expected
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
dnsmasq in 25.1.1/2 has a ‘possible’ bug that the dnsmasq strict-order functionality does not work as expected.
OPNsense respects the strict-order and forwards the dns request to the 1st listed server (rather than all in parallel); however, if the 1st server does not respond, dnsmasq does not forward the request to the next server; and instead waits for a long time and then the query times out.
To Reproduce
Steps to reproduce the behavior:
- I have BlockyDNS running on port 53035.
- I have a custom dnsmasq configuration file (0-custom.conf) with the following entries. The servers list on the GUI page are blank
server=192.168.1.1#53035
server=1.1.1.1
add-mac
add-subnet=32,128
If I enable the strict-order option in the GUI, my requests are only forwarded to 192.168.1.1:53035 and all works as expected.
However, if I disable my ‘Blocky DNS Instance’ running on port 53035, then the query just times out after a long time, rather than being forwarded to 1.1.1.1 as expected.
Expected behavior
dnsmasq to forward the query to the next listed dnsserver (1.1.1.1) rather than timing out.
Additional context
In addition, since a lot of changes are going into dnsmasq; may I request that these features be added to the dnsmasq GUI
- GUI option to specify a port number along with the dns server address (default 53 if unspecified)
- GUI options for add-mac
- GUI options for add-subnet
Environment OPNsense 25.1.2
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (11 by maintainers)
Cant you try this test yourself now? I think I have tested enough and I gave more hints what to potentially try.
It could be true that all DNS Servers must be exactly the same for this to work correctly.
It looks like strict order works as expected for me. I have configured 3 servers:
Sequence 1, Domain: example.com, Server: 192.168.99.99 Sequence 2, Domain: example.com, Server: 192.168.22.22 Sequence 3, Domain: example.com, Server: 8.8.4.4
This is the result of a new query that was not cached:
First try: 192.168.99.99.53 -> Timeout after 5s Second try: 192.168.22.22 -> Timeout after 5s Third try: 8.8.4.4 -> Woo response, my client got an answer (These all happened during one single nslookup, did not have to reinitiate it.)
I merely pointing you to the documentation, if the upstream documentation is wrong, my comment obviously is so too.