On 2023-05-09 16:15, Andrei Borzenkov wrote:
On 09.05.2023 15:29, Carlos E. R. wrote: ...
To achieve the above, I need this /etc/sysconfig/network/config:
NETCONFIG_DNS_POLICY='STATIC' NETCONFIG_DNS_FORWARDER='dnsmasq' NETCONFIG_DNS_STATIC_SEARCHLIST='valinor' NETCONFIG_DNS_STATIC_SERVERS='127.0.0.1 ::1' NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
It *has* to be done this way or it doesn't work properly. I have tested in many different manners, and this is the best.
WHY?
/etc/resolv.conf must point only to the local dnsmasq service. It must not be allowed to point to external servers, because that means that programs (say firefox) may bypass dnsmasq and waste time waiting for the remote server to answer.
On the other hand, dnsmasq must know about the external servers, it is its job. This can be a static definition, as I am doing right now, or a dynamic definition in some external file, which is what it had.
You set NETCONFIG_DNS_FORWARDER='dnsmasq' which expressly says that you wanted netconfig to update dnsmasq configuration.
I do not know what exactly does that variable. The comments on the config file say very little.
Now it turns out that you do not want or intend to update dnsmasq configuration. Of course, first telling netconfig to do something and then not providing it enough information to perform its task has the same effect as telling netconfig to not do something but how could anyone guess it? This is very roundabout way to simply disable /etc/resolv.conf management altogether (which would at least quite clearly state your actual intent).
With NM, I use: resolv-file=/run/NetworkManager/no-stub-resolv.conf this file contains: search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250 nameserver 2a02:9000::aaaa nameserver 2a02:9000::bbbb whereas /etc/resolv.conf contains: search valinor nameserver 127.0.0.1 This is exactly what I want. Using wicked, I want the same thing, but the resolv files I know about contains both remote and local information. So I can not get what I want unless I write a static dnsmasq.conf file myself. I hope that clarifies the situation for you. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)