mirror of
https://github.com/pi-hole/pi-hole
synced 2025-07-17 20:48:05 +00:00
cleanup and adding default whitelist
This commit is contained in:
parent
c8cd8c4cd3
commit
26f540c4de
@ -1,8 +0,0 @@
|
|||||||
# !/bin/bash
|
|
||||||
# Download the ad list
|
|
||||||
sudo /usr/local/bin/gravity.sh
|
|
||||||
|
|
||||||
# Enable DNS and start blocking ads
|
|
||||||
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
|
|
||||||
sudo mv /etc/dnsmasq.conf.pihole /etc/dnsmasq.conf
|
|
||||||
sudo service dnsmasq start
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# /usr/local/bin/gravity.sh
|
|
||||||
|
|
||||||
# URL to pull list of known ad servers from
|
|
||||||
adListURL="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext"
|
|
||||||
|
|
||||||
# Address to send ads to
|
|
||||||
piholeIP="127.0.0.1"
|
|
||||||
|
|
||||||
# Where the list of ad servers are stored once downloaded
|
|
||||||
# Any file in /etc/dnsmasq.d is loaded automatically when the service starts
|
|
||||||
adFile="/etc/dnsmasq.d/adList.conf"
|
|
||||||
|
|
||||||
# The temporary file for holding
|
|
||||||
eventHorizion="/etc/dnsmasq.d/adList.conf.tmp"
|
|
||||||
|
|
||||||
# Parses out the default 127.0.0.1 address and replaces it with the IP where ads will be sent
|
|
||||||
curl $adListURL | sed "s/127\.0\.0\.1/$piholeIP/" > $eventHorizion
|
|
||||||
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
# If the temporary list of ad servers already exists (the eventHorizion)
|
|
||||||
if [ -f "$eventHorizion" ];then
|
|
||||||
# Then replace it as the new ad file
|
|
||||||
mv -f $eventHorizion $adFile
|
|
||||||
else
|
|
||||||
echo "Error building the ad list, please try again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
11
advanced/whitelist.txt
Normal file
11
advanced/whitelist.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
0.0.0.0
|
||||||
|
127.0.0.1
|
||||||
|
android
|
||||||
|
android.localhost
|
||||||
|
broadcasthost
|
||||||
|
jacobsalmela.com
|
||||||
|
local
|
||||||
|
localhost
|
||||||
|
localhost.localdomain
|
||||||
|
test
|
||||||
|
test.localhost
|
@ -1,6 +0,0 @@
|
|||||||
domain-needed
|
|
||||||
interface=eth0
|
|
||||||
min-port=4096
|
|
||||||
cache-size=10000
|
|
||||||
log-queries
|
|
||||||
bogus-priv
|
|
@ -1,48 +0,0 @@
|
|||||||
# /etc/lighttpd/lighttpd.conf
|
|
||||||
server.modules = (
|
|
||||||
"mod_access",
|
|
||||||
"mod_alias",
|
|
||||||
"mod_compress",
|
|
||||||
"mod_redirect",
|
|
||||||
"mod_auth",
|
|
||||||
"mod_rewrite",
|
|
||||||
)
|
|
||||||
|
|
||||||
server.document-root = "/var/www"
|
|
||||||
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
|
|
||||||
server.errorlog = "/var/log/lighttpd/error.log"
|
|
||||||
server.pid-file = "/var/run/lighttpd.pid"
|
|
||||||
server.username = "www-data"
|
|
||||||
server.groupname = "www-data"
|
|
||||||
server.port = 80
|
|
||||||
|
|
||||||
|
|
||||||
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
|
|
||||||
url.access-deny = ( "~", ".inc" )
|
|
||||||
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
|
|
||||||
|
|
||||||
compress.cache-dir = "/var/cache/lighttpd/compress/"
|
|
||||||
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
|
|
||||||
|
|
||||||
# default listening port for IPv6 falls back to the IPv4 port
|
|
||||||
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
|
|
||||||
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
|
||||||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
|
|
||||||
|
|
||||||
# Optional if a password protected directory is desired
|
|
||||||
# See http://jacobsalmela.com/password-protect-a-lighttpd-web-server-on-a-raspberry-pi-using-mod-auth/
|
|
||||||
#auth.backend = "htdigest"
|
|
||||||
#auth.backend.htdigest.userfile = "/etc/lighttpd/.htpasswd/lighttpd-htdigest.user"
|
|
||||||
#auth.require = ( "/stream/" =>
|
|
||||||
# (
|
|
||||||
# "method" => "digest",
|
|
||||||
# "realm" => "lcars",
|
|
||||||
# "require" => "valid-user"
|
|
||||||
# ),
|
|
||||||
#)
|
|
||||||
|
|
||||||
# Rewrites all URLs to the /var/www/pihole/index.html
|
|
||||||
# This should be a blank file (for speed)
|
|
||||||
$HTTP["host"] =~ ".*" {
|
|
||||||
url.rewrite = (".*" => "pihole/index.html")
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
nameserver 192.168.1.101
|
|
||||||
nameserver 8.8.8.8
|
|
||||||
nameserver 8.8.4.4
|
|
Loading…
Reference in New Issue
Block a user