Created
July 3, 2017 09:10
-
-
Save viviparous/bee0108376966efb02671aaab4de2afe to your computer and use it in GitHub Desktop.
Configure dnsmasq from scratch on Debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assumption: you know how to install dnsmasq, and you have done so. | |
##############################/etc/default/dnsmasq | |
#contains useful information | |
#IGNORE_RESOLVCONF=yes | |
##############################/etc/resolv.conf | |
domain home | |
search home | |
nameserver 127.0.0.1 | |
#############################/etc/resolv.dnsmasq | |
#opendns | |
nameserver 208.67.222.222 | |
nameserver 208.67.220.220 | |
############################/etc/dnsmasq.conf | |
#test the config using sudo dnsmasq --test | |
#disable dns | |
#port=0 | |
#XXX == This machine | |
listen-address=127.0.0.1,192.168.1.XXX | |
#where to find the list of additional domains to block | |
#format: 0.0.0.0 baddomain | |
#addn-hosts=/etc/banner_add_hosts | |
addn-hosts=/etc/dnsmasq_addn_hosts_blockfile.txt | |
log-queries | |
#log-facility=/etc/dnsmasq.log | |
# Include another lot of configuration options. | |
conf-file=/etc/dnsmasq.more.conf | |
#conf-dir=/etc/dnsmasq.d | |
# Include all the files in a directory except those ending in .bak | |
#conf-dir=/etc/dnsmasq.d,.bak | |
# Include all files in a directory which end in .conf | |
#conf-dir=/etc/dnsmasq.d/*.conf | |
cache-size=10000 | |
#pointer to list of upstream DNS | |
#no-resolv | |
resolv-file=/etc/resolv.dnsmasq | |
#set interface | |
interface=eth0 | |
local-ttl=300 | |
log-async | |
domain-needed | |
bogus-priv | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment