From 4c3688a6428fb9b5b92f3dae98814001b4acb8ff Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 17 Sep 2020 14:22:54 +0200 Subject: [PATCH] Remove default DNS if PiHole is enabled --- openmptcprouter/files/etc/init.d/openmptcprouter-vps | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index 5d18c2ed7..629a0980c 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -483,6 +483,7 @@ _get_pihole() { if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')" uci -q batch <<-EOF >/dev/null + del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353" add_list dhcp.@dnsmasq[0].server="$host_ip#53" set dhcp.@dnsmasq[0].rebind_protection='0' commit dhcp @@ -496,6 +497,7 @@ _get_pihole() { if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')" uci -q batch <<-EOF >/dev/null + del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353" add_list dhcp.@dnsmasq[0].server="$host_ip#53" set dhcp.@dnsmasq[0].rebind_protection='0' commit dhcp @@ -509,6 +511,7 @@ _get_pihole() { if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')" uci -q batch <<-EOF >/dev/null + del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353" add_list dhcp.@dnsmasq[0].server="$host_ip#53" set dhcp.@dnsmasq[0].rebind_protection='0' commit dhcp @@ -522,6 +525,7 @@ _get_pihole() { if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')" uci -q batch <<-EOF >/dev/null + del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353" add_list dhcp.@dnsmasq[0].server="$host_ip#53" set dhcp.@dnsmasq[0].rebind_protection='0' commit dhcp @@ -535,6 +539,7 @@ _get_pihole() { if [ "$pihole" = "true" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep $host_ip)" ]; then uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')" uci -q batch <<-EOF >/dev/null + del_list dhcp.@dnsmasq[0].server="127.0.0.1#5353" add_list dhcp.@dnsmasq[0].server="$host_ip#53" set dhcp.@dnsmasq[0].rebind_protection='0' commit dhcp