Add DNSSEC support to Pi-hole core

This commit is contained in:
DL6ER 2017-01-12 16:02:41 +01:00
parent 10f77df8bb
commit b56ca2b834
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 16 additions and 1 deletions

View File

@ -111,6 +111,15 @@ ProcessDNSSettings() {
add_dnsmasq_setting "bogus-priv" add_dnsmasq_setting "bogus-priv"
fi fi
delete_dnsmasq_setting "dnssec"
delete_dnsmasq_setting "trust-anchor="
if [[ "${DNSSEC}" == true ]]; then
echo "dnssec
trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
" >> "${dnsmasqconfig}"
fi
} }
SetDNSServers(){ SetDNSServers(){
@ -130,12 +139,18 @@ SetDNSServers(){
change_setting "DNS_FQDN_REQUIRED" "false" change_setting "DNS_FQDN_REQUIRED" "false"
fi fi
if [[ "${args[4]}" == "bogus-priv" || "${args[5]}" == "bogus-priv" ]]; then if [[ "${args[5]}" == "bogus-priv" ]]; then
change_setting "DNS_BOGUS_PRIV" "true" change_setting "DNS_BOGUS_PRIV" "true"
else else
change_setting "DNS_BOGUS_PRIV" "false" change_setting "DNS_BOGUS_PRIV" "false"
fi fi
if [[ "${args[6]}" == "dnssec" ]]; then
change_setting "DNSSEC" "true"
else
change_setting "DNSSEC" "false"
fi
ProcessDNSSettings ProcessDNSSettings
# Restart dnsmasq to load new configuration # Restart dnsmasq to load new configuration