faketime"
run "sudo touch /etc/authbind/byport/53"
run "sudo chmod 755 /etc/authbind/byport/53"
+
+ # Install dnsmasq to make lookups more robust
+ run "sudo apt-get -qq --no-install-recommends install \
+ dnsmasq"
+ run 'echo listen-address=127.0.0.53 | sudo tee /etc/dnsmasq.d/local.conf'
+ run 'echo bind-interfaces | sudo tee -a /etc/dnsmasq.d/local.conf'
+
+ ## WARNING
+ ## after this dnsmasq restart, DNS lookups will fail for a few seconds.
+ run 'sudo service dnsmasq restart'
+ run "sudo resolvconf --disable-updates"
+ run 'echo nameserver 127.0.0.53 | sudo tee /etc/resolv.conf'
+ run "export RESOLVERIP=127.0.0.53"
}
install_ixfrdist() {
$RUNWRAPPER $PDNS --daemon=no --local-address=$address --local-port=$port --config-dir=. \
--config-name=$backend --socket-dir=./ --no-shuffle \
- --dnsupdate=yes --resolver=8.8.8.8 --outgoing-axfr-expand-alias=yes \
+ --dnsupdate=yes --resolver=$RESOLVERIP --outgoing-axfr-expand-alias=yes \
--expand-alias=yes \
--cache-ttl=$cachettl --dname-processing \
--disable-axfr-rectify=yes $lua_prequery &
--config-name=ldap --socket-dir=./ --no-shuffle \
--query-logging --dnsupdate=yes \
--expand-alias=yes --outgoing-axfr-expand-alias=yes \
- --resolver=8.8.8.8 \
+ --resolver=$RESOLVERIP \
--cache-ttl=$cachettl --dname-processing $lua_prequery &
skipreasons="nodnssec noent nodyndns nometa noaxfr"
export ZONE2LDAP=${ZONE2LDAP:-${PWD}/../pdns/zone2ldap}
export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control}
+export RESOLVERIP=${RESOLVERIP:-8.8.8.8}
ALGORITHM=${ALGORITHM:="hmac-md5"}