<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Depends on how you use dnsmasq. If you use NetworkManager managed
      instance, it can create /etc/resolv.conf for you. Define
      dns=dnsmasq in NetworkManager.conf and restart the service. That's
      it!</p>
    <p>Or just rm -f /etc/resolv.conf && sudoedit
      /etc/resolv.conf, manually.<br>
    </p>
    <div class="moz-cite-prefix">On 04. 06. 24 11:10, Chris Green wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:Zl7Z_22YsmzgJWgD@q957">
      <pre class="moz-quote-pre" wrap="">I run dnsmasq instead of systemd-resolved on all my systems.

I have just built a new xubuntu 24.04 system and, having disabled
systemd-resolved and installed dnsmasq it appears to be working OK but
the /etc/resolv.conf symbolic link is broken, so there's no
/etc/resolv.conf which upsets some programs.

Should I just manually edit /etc/resolv.conf or is there some better
way of handling this?  All the systems in question just use dnsmasq
for local DNS cacheing and use the router at 192.168.1.1 for upstream
DNS queries.  Thus, on other systems on the LAN, I just have an
/etc/resolv.conf file as follows:-

    search zbmc.eu
    nameserver 127.0.0.1

Should I just create an /etc/resolv.conf like this for the new system?
</pre>
    </blockquote>
    <p>No, there is no way on dnsmasq to manage /etc/resolv.conf. Just
      create it manually as normal file. Depends on if you use
      resolvconf or similar tool. At least on Fedora systemd-resolved
      tends to take /etc/resolv.conf, if it already does not exist on
      boot. So you need to create it as normal file to prevent it.</p>
    <p>I suggest adding option ends0 trust-ad into it. Dnsmasq's TCP
      retry is somehow poor, using edns0 wherever it works will improve
      its performance. It should work on every sane network. Consider
      lowering timeout and increasing attempts. options timeout:3
      attempts:3 or timeout:2 attempts:4 might work better. Dnsmasq
      retries are driven by external clients, caching should reduce
      issues with it when network works.<span
      style="white-space: pre-wrap">
</span></p>
    <pre class="moz-signature" cols="72">-- 
Petr Menšík
Software Engineer, RHEL
Red Hat, <a class="moz-txt-link-freetext" href="http://www.redhat.com/">http://www.redhat.com/</a>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB</pre>
  </body>
</html>