On Mon, 1 Jul 2019 22:22:09 -0700
Mike Wright <nobody(a)nospam.hostisimo.com> wrote:
I use three dns servers on one host: an authority, a caching server,
then dnsmasq in front of all that to return a localhost address for
ad servers I want to block (they all hit a web server that returns
status 200 content-length 0).
Here is my very limited dnsmasq.conf:
#no local IPs
except-interface=lo
# don't reference /etc/hosts
no-hosts
# use eth0
interface=eth0
# you need this when running another nameserver on the same machine
bind-interfaces
# let dnsmasq front run
listen-address=10.2.0.20 # all other hosts have this IP in
resolv.conf
#upstream server (dnscache)
server=127.0.1.53 # only dnsmasq accesses my caching server
#location of sites to be proxied
conf-dir=/etc/dnsmasq.d/ # where my file of ad servers lives
I don't use NetworkManager. I have too many nics and bridges and NM
spends all its time taking my interfaces up and down and assigning
them dhcp addresses, rendering my network more or less unusable.
Using dnsmasq to tie the various pieces together works very well,
reliably.
Thanks for this. I will save it for future reference. After I get the
caching server working.