What's new

dnsmasq no-resolv config option

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tomsk

Very Senior Member
Im confused a bit by this.... in the dnsmasq setup page i read.... "processes local to the machine will not use dnsmasq, since they get their information about which nameservers to use from /etc/resolv.conf, which is set to the upstream nameservers. To fix this, simply replace the nameserver in /etc/resolv.conf with the local address 127.0.0.1 and give the address(es) of the upstream nameserver(s) to dnsmasq directly. You can do this using either the server option, or by putting them into another file, and telling dnsmasq about its location with the resolv-file option".
If we are already putting 127.0.0.1 into the /etc/resolv.conf file then why do we need no-resolv to ignore it when setting up something like DNSCrypt?... shouldn't it just read the server= line anyway?
 
On my router /etc/resolv.conf (which is /tmp/etc/resolv.conf, which in turn is a symlink to /rom/etc/resolv.conf) already contains 127.0.0.1, and there is a /tmp/resolv.conf containing the upstream name servers. Since the latter resides in /tmp it is dynamically generated by the router startup scripts (or dhcp client).

I am using googles name servers so I'm not sure how it would look if is was generated by dhcp.
 
If i check the /tmp/resolv.conf with the VPN running it contains the DNS servers of the VPN provider. If the VPN is off it will show the google DNS, so yup it is being changed dynamically. So what does the no-resolv option do? is it telling dnsmasq to ignore the /tmp/resolv.conf file?

The man page only says

-R, --no-resolv
Don't read /etc/resolv.conf. Get upstream servers only from the command line or the dnsmasq configuration file.
 
Last edited:
If i check the /tmp/resolv.conf with the VPN running it contains the DNS servers of the VPN provider. If the VPN is off it will show the google DNS, so yup it is being changed dynamically.

Hi - just wondered if you ever found a workaround for this - I'm finding that the DNS servers of the VPN provider are being added also.
 
This is controlled by the DNS setting found on the OpenVPN Client page.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top