Hello,
I'm having a strange (I think) issue with DNSmasq. If I set it up to use the servers listed in System/Settings/General, everything works perfectly: I can go out to the internet and resolve local hostnames (as defined by the host overrides).
However, if I create a custom .conf file in /usr/local/etc/dnsmasq.conf.d/ with:
no-resolv
server=<dns server ip>
(using the same server that I would put in System/Settings/General), I can still go out to the internet but I lose local hostname resolution despite host overrides being defined.
Is this expected behavior?
Running 25.1.7_4.
Thanks
Is anyone using 'no-resolv' without any side effects?
I would guess that no-resolv is not your problem, but server= is. If you do not limit the scope of that option, then all queries will get forwarded to that upstream server, effectively disabling any local resolution.
Thanks for replying. I suspect you're correct.
However, I've tried defining local domains (local=/local.domain.1/ local=/local.domain.2/ - on separate lines). I've tried inserting bogus-priv. I've tried defining host overrides in the config (address=/local.domain.1/192.168.x.x). Whatever I do, local hostname resolution breaks.
I'm not a particularly advanced user regarding DNS, would you happen to know how to properly limit the scope of server=?
Cheers
Normally, you should not have to do that. Withe the next upcoming release, local= can be populated automatically by the static reservations, see the OpnSense DNSmasq docs.
Thanks again for the reply.
The docs appear to imply that DNSmasq is used for dhcp. I'm using KEA at the moment and would really rather not go through transferring all my reservations again.
Do you happen to know how to manually restrict the scope of server= to have dnsmasq still perform hostname resolution according to the host overrides list?
Thanks
No, I have not used a Kea/DNSmasq combination yet.
Thanks for taking the time to answer my questions.
If anyone is successfully using 'no-resolv' in DNSmasq, I'd love to hear from you.
Cheers