Update 2020.04.26-23:10:48

This commit is contained in:
Zelo72 2020-04-26 23:10:49 +02:00
parent dfe9d035ca
commit a23fcd5060
3 changed files with 71 additions and 1 deletions

View File

@ -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

View File

@ -1,3 +1,2 @@
sendgrid\.net
(\.cn$|\.ru$|\.vn$)
^wpad\.

70
unbound/installUnbound.sh Normal file
View File

@ -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 ""