mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
Change to -i, interface
This commit is contained in:
parent
721ada7e16
commit
01273124ea
1 changed files with 11 additions and 11 deletions
|
@ -27,11 +27,11 @@ helpFunc() {
|
||||||
::: -f, fahrenheit Set Fahrenheit temperature unit
|
::: -f, fahrenheit Set Fahrenheit temperature unit
|
||||||
::: -k, kelvin Set Kelvin temperature unit
|
::: -k, kelvin Set Kelvin temperature unit
|
||||||
::: -h, --help Show this help dialog
|
::: -h, --help Show this help dialog
|
||||||
::: listening Setup interface listening behavior of dnsmasq
|
::: -i, interface Setup interface listening behavior of dnsmasq
|
||||||
::: pihole -a listening allinterfaces : Listen on all interfaces, permit all origins
|
::: pihole -a -i all : Listen on all interfaces, permit all origins
|
||||||
::: pihole -a listening gravityinterface : Listen only on one interface (see PIHOLE_INTERFACE)
|
::: pihole -a -i single : Listen only on one interface (see PIHOLE_INTERFACE)
|
||||||
::: pihole -a listening localsubnets : Listen on all interfaces, but allow only queries from
|
::: pihole -a -i local : Listen on all interfaces, but allow only queries from
|
||||||
::: devices that are at most one hop away (local devices)
|
::: devices that are at most one hop away (local devices)
|
||||||
EOM
|
EOM
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
@ -142,11 +142,11 @@ trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE3
|
||||||
delete_dnsmasq_setting "interface"
|
delete_dnsmasq_setting "interface"
|
||||||
delete_dnsmasq_setting "local-service"
|
delete_dnsmasq_setting "local-service"
|
||||||
|
|
||||||
if [[ "${DNSMASQ_LISTENING}" == "allinterfaces" ]]; 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
|
# Leave a comment in 01-pihole.conf
|
||||||
add_dnsmasq_setting "# Listening on all interfaces"
|
add_dnsmasq_setting "# Listening on all interfaces"
|
||||||
elif [[ "${DNSMASQ_LISTENING}" == "gravityinterface" ]]; then
|
elif [[ "${DNSMASQ_LISTENING}" == "single" ]]; then
|
||||||
# Listen only on one interface
|
# Listen only on one interface
|
||||||
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
|
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
|
||||||
else
|
else
|
||||||
|
@ -390,10 +390,10 @@ SetListeningMode(){
|
||||||
|
|
||||||
source "${setupVars}"
|
source "${setupVars}"
|
||||||
|
|
||||||
if [[ "${args[2]}" == "allinterfaces" ]] ; then
|
if [[ "${args[2]}" == "all" ]] ; then
|
||||||
echo "Listening on all interfaces, permiting all origins"
|
echo "Listening on all interfaces, permiting all origins, hope you have a firewall!"
|
||||||
change_setting "DNSMASQ_LISTENING" "allinterfaces"
|
change_setting "DNSMASQ_LISTENING" "allinterfaces"
|
||||||
elif [[ "${args[2]}" == "gravityinterface" ]] ; then
|
elif [[ "${args[2]}" == "single" ]] ; then
|
||||||
echo "Listening only on interface ${PIHOLE_INTERFACE}"
|
echo "Listening only on interface ${PIHOLE_INTERFACE}"
|
||||||
change_setting "DNSMASQ_LISTENING" "gravityinterface"
|
change_setting "DNSMASQ_LISTENING" "gravityinterface"
|
||||||
else
|
else
|
||||||
|
@ -427,7 +427,7 @@ main() {
|
||||||
"addstaticdhcp" ) AddDHCPStaticAddress;;
|
"addstaticdhcp" ) AddDHCPStaticAddress;;
|
||||||
"removestaticdhcp" ) RemoveDHCPStaticAddress;;
|
"removestaticdhcp" ) RemoveDHCPStaticAddress;;
|
||||||
"hostrecord" ) SetHostRecord;;
|
"hostrecord" ) SetHostRecord;;
|
||||||
"listening" ) SetListeningMode;;
|
"-i" | "interface" ) SetListeningMode;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue