N
N
Ninazu2019-01-11 14:46:54
linux
Ninazu, 2019-01-11 14:46:54

How to configure dnsmasq in NetworkManager LinuxMint19.1?

In general, the situation is as follows. Previously, there was Mint18.3, and this method worked there. When installing 19.1, apparently something in the Matrix has changed, and now it does not want to work. The task is next. Direct all subdomains of a specific domain to the local machine.
Verify that dnsmasq is running sudo netstat -lnpt

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1227/dnsmasq

Config /etc/NetworkManager/NetworkManager.conf looks like this for me
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

Next, I create the dnsmasq settings file /etc/NetworkManager/dnsmasq.d/local.conf with the following content
address=/dev/127.0.1.1
address=/loc/127.0.0.1

And just in case, I reboot the system. Then
ping -a test.loc
ping -a test.dev

return Name or service not known
If you add it to the main NetworkManager.conf
dns=dnsmasq
section, then the Internet stops working altogether. Although the processes appear
nobody    1144  0.0  0.0  52880  4248 ?        S    11:50   0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 --cache-size=0 --clear-on-reload --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question