On 07/21/2016 09:27 AM, Beniamino Galvani wrote:
On Thu, Jul 21, 2016 at 08:17:22AM +0200, Nicolas Bock wrote:I am using 'dns=dnsmasq' and would like to specify a fallback DNS server that is always appended to the list of servers in the auto-generated dnsmasq.conf. Is that possible?Hi, you can drop a file with additional configuration for dnsmasq into the /etc/NetworkManager/dnsmasq.d/ directory, as: echo "server=1.2.3.4" > /etc/NetworkManager/dnsmasq.d/static-server
How do I check that dnsmasq is using the server? NetworkManager started dnsmasq with /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/NetworkManager/dnsmasq.pid --listen-address=127.0.0.1 --cache-size=400 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d and in /etc/NetworkManager/dnsmasq.d is only the file I dropped in there with the fallback DNS servers. Nick
and reactivate one of the connections (or restart NM). Note that dnsmasq sends a request to all known servers at the same time and accepts the first valid reply it receives, so the new server will receive all queries as the other ones (unless you restrict it to specific domains using the "server=/domain/1.2.3.4" syntax). Beniamino
Attachment:
signature.asc
Description: OpenPGP digital signature