/var/run/dnsmasq/resolv.conf nameserver contents
If your configuration is working at this moment, then even after your system restarts.
dnsmasq
is configured by a configuration file with the name
/etc/dnsmasq.conf
and also /etc/hosts
and /etc/resolv.conf
are essential and all files in /etc/dnsmasq.d/
will be considered.
The IP address 127.0.1.1
is ok and, also as 127.0.0.1
, your host or in other words, the localhost
.
Without a modification in /etc/dnsmasq.conf
, dnsmasq
reads your /etc/resolv.conf
and use your router (192.168.1.1
in your case) as nameserver.
Test it. Search the line
#no-resolv
in /etc/dnsmasq.conf
and remove the #
. Now restart dnsmasq
sudo systemctl restart dnsmasq
and try to ping google.com
. It should fail, if there is no other nameserver defined in your /etc/dnsmasq.conf
Related videos on Youtube
A.B.
ZX81, C64, DR-DOS, OS/2, Linux Talk with me in Ask Ubuntu General Room profile for A.B. on Stack Exchange, a network of free, community-driven Q&A sites http://stackexchange.com/users/flair/186154.png
Updated on September 18, 2022Comments
-
A.B. over 1 year
Xubuntu 15.10 using Ethernet
From my understanding,
/var/run/dnsmasq/resolv.conf
should contain the nameservers used by dnsmasq to resolve addresses and is configured by a script called by network-manager. In my case, the file contains onlynameserver 127.0.1.1
which doesn't seem right. My IPv4 address of the only network interface on my machine is static and the IPv6 auto-configured. In both cases my router is set as my DNS server. There are the contents/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 # Generated by NetworkManager nameserver 192.168.1.1 nameserver fe80::1%eth0
dig command shows
;; SERVER: 127.0.0.1#53(127.0.0.1)
indicating it used dnsmasq for resolution but then what does dnsmasq use?Note that name resolution is working just fine my questions are whether this setup would break with a reboot and whether IPv6 name resolution works at all. Thanks.
-
A.B. over 8 yearsYes, perhaps. And?
-
Admin over 8 yearsI just don't like uncertainty.
-
A.B. over 8 yearsRead your question and read my answer. If you have further questions, ask new questions as new questions, but don't in the comments.