-
Notifications
You must be signed in to change notification settings - Fork 791
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
dnsmasq: strict-order functionality not working as expected #8416
Comments
I kind of expect we can drop the order again as
The option you might be looking for is
|
dnsmasq does respect ‘strict-order’ for the server statements in the custom conf file. OPNsense also works this way, problem occurs when the 1st server is unavailable. The query is supposed to be passed onto the next server in the list; but currently it just times out (after trying the 1st server). ‘all-server’ is not what I am looking for, all-servers is the default behaviour of dnsmasq, I am specifically looking for ‘strict-order’ as this is the only mechanism to deliver a fail-safe backup. Also, as written earlier - OPNsense 24.x was working exactly like this, something changed during the 24.7 cycle and the new behaviour has carried over to 25.x If dnsmasq was to work as you state, then what feature does ‘strict-order’ provide? |
I merely pointing you to the documentation, if the upstream documentation is wrong, my comment obviously is so too. |
Hi @fichtner Not questioning your judgement ( as you guys are a lot smarter than most), just an observation… |
From what I read it seems like strict-order really only influences resolv.conf. Yet server directives are also processed somewhat sequential from the configuration file, so the order can influence something. Yet not in any strict way. Details are a little hazy. |
From empiric tests it looks like the upstream documentation is wrong:
|
@Monviech ok, thanks for testing, so we'll leave the sequence in there then. |
Would you be kind enough to do an additional test? strict-order is ON and assign Sequence 1 to some dummy IP address Example...
This will hopefully test whether the dnsquery gets forwarded to the next server (8.8.4.4 in your example) or does it just time out retrying the first server. |
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 This is the result of a new query that was not cached:
First try: 192.168.99.99.53 -> Timeout after 5s |
Maybe your client does not time out correctly. DNSmasq default behavior is that the client must time out. Try out this option: https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html |
Thanks for the update. 👍 One last test please… What happens when you use a non default port lets say 53035 instead of default 53
My custom-dnsmasq.conf contains the following
So, I am wondering if the behaviour I see is to do with custom ports ! Q1. Does the query still get forwarded to the next in sequence, if you use custom ports? Also, could you look at providing GUI support to enter the (optional) port number in the System > Settings > General > DNS Server field? Maybe an additional edit box to enter optional port number, or allow port number in the DNS server edit boxitself. |
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. |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
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:
The servers list on the GUI page are blank
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
Environment
OPNsense 25.1.2
The text was updated successfully, but these errors were encountered: