Moved DNS over TLS at start as DNS is required in firewall anyway

This commit is contained in:
Quentin McGaw
2018-09-28 19:51:30 +02:00
parent 93ea50bd49
commit b8dbf0761f
3 changed files with 15 additions and 14 deletions

View File

@@ -19,6 +19,17 @@ do
done
printf "\nTUN device is opened"
############################################
# SETTING DNS OVER TLS TO 1.1.1.1 / 1.0.0.1
############################################
printf "\nLaunching Unbound daemon to connect to Cloudflare DNS 1.1.1.1 at its TLS endpoint..."
unbound
printf "DONE"
printf "\nChanging DNS to localhost..."
echo "nameserver 127.0.0.1" > /etc/resolv.conf
echo "options ndots:0" >> /etc/resolv.conf
printf "DONE"
############################################
# ORIGINAL IP FOR HEALTHCHECK
############################################
@@ -85,17 +96,6 @@ printf "DONE"
#ip6tables -A OUTPUT -p udp -m udp --dport 53 -j ACCEPT 2>/dev/null
#printf "DONE"
############################################
# SETTING DNS OVER TLS TO 1.1.1.1 / 1.0.0.1
############################################
printf "\nLaunching Unbound daemon to connect to Cloudflare DNS 1.1.1.1 at its TLS endpoint..."
unbound
printf "DONE"
printf "\nChanging DNS to localhost..."
echo "nameserver 127.0.0.1" > /etc/resolv.conf
echo "options ndots:0" >> /etc/resolv.conf
printf "DONE"
############################################
# USE NON-ROOT USER
############################################