Default behavior is old behavir (listen on gravity interface (e.g. eth0), permit all origins)

This commit is contained in:
DL6ER 2017-03-03 22:58:41 +01:00
parent 6f1ed28d0a
commit dd971b6ee5
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 8 additions and 10 deletions

View File

@ -144,15 +144,13 @@ trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE3
if [[ "${DNSMASQ_LISTENING}" == "all" ]]; then if [[ "${DNSMASQ_LISTENING}" == "all" ]]; then
# Listen on all interfaces, permit all origins # Listen on all interfaces, permit all origins
# Leave a comment in 01-pihole.conf
add_dnsmasq_setting "# Listening on all interfaces"
add_dnsmasq_setting "except-interface" "nonexisting" add_dnsmasq_setting "except-interface" "nonexisting"
elif [[ "${DNSMASQ_LISTENING}" == "single" ]]; then elif [[ "${DNSMASQ_LISTENING}" == "local" ]]; then
# Listen only on one interface
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
else
# Listen only on all interfaces, but only local subnets # Listen only on all interfaces, but only local subnets
add_dnsmasq_setting "local-service" add_dnsmasq_setting "local-service"
else
# Listen only on one interface
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
fi fi
} }
@ -394,12 +392,12 @@ SetListeningMode(){
if [[ "${args[2]}" == "all" ]] ; then if [[ "${args[2]}" == "all" ]] ; then
echo "Listening on all interfaces, permiting all origins, hope you have a firewall!" echo "Listening on all interfaces, permiting all origins, hope you have a firewall!"
change_setting "DNSMASQ_LISTENING" "all" change_setting "DNSMASQ_LISTENING" "all"
elif [[ "${args[2]}" == "single" ]] ; then elif [[ "${args[2]}" == "local" ]] ; then
echo "Listening only on interface ${PIHOLE_INTERFACE}"
change_setting "DNSMASQ_LISTENING" "single"
else
echo "Listening on all interfaces, permitting only origins that are at most one hop away (local devices)" echo "Listening on all interfaces, permitting only origins that are at most one hop away (local devices)"
change_setting "DNSMASQ_LISTENING" "local" change_setting "DNSMASQ_LISTENING" "local"
else
echo "Listening only on interface ${PIHOLE_INTERFACE}"
change_setting "DNSMASQ_LISTENING" "single"
fi fi
# Don't restart DNS server yet because other settings # Don't restart DNS server yet because other settings