Skip to content

Commit

Permalink
add fallback dns server (quad9) if none is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlijnWajer committed Feb 5, 2022
1 parent d316dfd commit 49afd83
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion etc/50_ipv4_network_setup
Expand Up @@ -67,12 +67,22 @@ static | bound | renew)
R="${R}domain $domain
"
fi

D=""
for i in $dns
do
R="${R}nameserver $i
D="${D}nameserver $i
"
done

# Let's just pick a default if none were provided... Quad9 seems better
# than google and cloudflare at least.
if [ -z "$D" ]
then
D="${D}nameserver 9.9.9.9
"
fi

echo -n "$R" | /sbin/resolvconf -a "${interface}.udhcpc"

# Clear dnsmasq cache after getting new nameservers
Expand Down

0 comments on commit 49afd83

Please sign in to comment.