Setup dnsmasq DNS server attachment
mouse 3089 · person cloud · link
Last update
2018-02-23
2018
02-23
« — »

Dnsmasq is very useful to cache DNS requests and speedup home connections:

1
apt-get install dnsmasq

put in /etc/dnsmasq.d/local.conf:

1
2
3
4
no-poll
cache-size=300
server=84.200.69.80
server=84.200.70.40

put in /etc/dnsmasq.d/ the attached ads.conf file built on both MVPS hosts list and pgl.yoyo.org list (you can update this list with the attached update-dnsmasq-adsblock.rb script).

Restart the service:

1
systemctl restart dnsmasq

Auto flush cache every week, put in root crontab:

1
2
#  m   h   dom   mon   dow   command
   0   4     1     *     *   pkill -HUP dnsmasq > /dev/null 2> /dev/null

And put in /etc/resolv.conf:

1
nameserver 127.0.0.1

Source: dnsmasq hp