From a23fcd5060ea77857f72f4504fb71df4ccc866d0 Mon Sep 17 00:00:00 2001 From: Zelo72 Date: Sun, 26 Apr 2020 23:10:49 +0200 Subject: [PATCH] Update 2020.04.26-23:10:48 --- pihole/adlists.list | 1 + pihole/regex.list | 1 - unbound/installUnbound.sh | 70 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 unbound/installUnbound.sh diff --git a/pihole/adlists.list b/pihole/adlists.list index 37844221..5c882bed 100644 --- a/pihole/adlists.list +++ b/pihole/adlists.list @@ -29,3 +29,4 @@ https://v.firebog.net/hosts/static/w3kbl.txt https://justdomains.github.io/blocklists/lists/nocoin-justdomains.txt #*** QuidSup *** https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt +https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt diff --git a/pihole/regex.list b/pihole/regex.list index 93e67547..5d561254 100644 --- a/pihole/regex.list +++ b/pihole/regex.list @@ -1,3 +1,2 @@ -sendgrid\.net (\.cn$|\.ru$|\.vn$) ^wpad\. diff --git a/unbound/installUnbound.sh b/unbound/installUnbound.sh new file mode 100644 index 00000000..bd4e2a87 --- /dev/null +++ b/unbound/installUnbound.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +# Script zur Installation und Konfiguration von Unbound als Pihole DNS-Server +# +# HINWEIS/WICHTIG: Erst Pihole, dann Unbound installieren! + +# Script muss als Root ausgeführt werden +if [ "$(id -u)" != "0" ]; then + echo "Das Script muss mit Rootrechten ausgeführt werden!" + exit 1 +fi + +echo "*** Unbound installieren" +echo "" +apt-get update +apt-get install unbound -y +echo "" +echo "" + +echo "*** Unbound Pihole-Konfiguration und internic Root Server (root.hints) speichern" +echo "" +wget -O /etc/unbound/unbound.conf.d/pi-hole.conf https://raw.githubusercontent.com/Zelo72/rpi/master/unbound/pi-hole.conf +echo "" +wget -O /var/lib/unbound/root.hints https://www.internic.net/domain/named.root +echo "" +echo "" + +read -p "Zeitsynchronisation konfigurieren *empfohlen* (j/n)? " respntp +if [ "$respntp" != "${respntp#[Jj]}" ]; then + echo "*** Zeitsynchronisation konfigurieren" + echo "" + wget -O /etc/systemd/timesyncd.conf https://raw.githubusercontent.com/Zelo72/rpi/master/unbound/timesyncd.conf + timedatectl set-ntp true + timedatectl set-timezone 'Europe/Berlin' + hwclock -w +fi +echo "" +echo "" + +echo "*** Script /root/updateUnboundRootHints.sh für internic Root-Server Aktualisierung speichern" +wget -O /root/updateUnboundRootHints.sh https://raw.githubusercontent.com/Zelo72/rpi/master/unbound/updateUnboundRootHints.sh +chmod +x /root/updateUnboundRootHints.sh +echo "" +read -p "Updatescript für monatliche Root-Server Aktualisierung als Cronjob einrichten *empfohlen* (j/n)? " respcron +if [ "$respcron" != "${respcron#[Jj]}" ]; then + echo "*** Updatescript für monatliche Root-Server Aktualisierung als Cronjob eintragen" + echo "" + echo -e "$(crontab -l)\n 0 4 1 * * /root/updateUnboundRootHints.sh > /var/log/updateUnboundRootHints.cron.log 2>&1" | crontab - +fi +echo "" +echo "" + +echo "*** Unbound neu starten" +service unbound restart +echo "" +echo "" + +echo "*** Unbound DNS-Auflösung testen" +echo "" +dig pi-hole.net @127.0.0.1 -p 5335 +echo "" +echo "" +echo "***********************************************************************************" +echo "Abschliessende manuelle Konfiguration in Pihole:" +echo " In Pihole 127.0.0.1#5335 im Webinterface unter Settings > DNS > Custom 1 (IPv4)" +echo " als DNS konfigurieren!" +echo " Alle anderen bereits konfigurierten DNS-Server deaktivieren!" +echo "***********************************************************************************" +echo "" +echo "" \ No newline at end of file