hosts format script
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
no-resolv
|
||||
no-poll
|
||||
server=/localnet/192.168.0.1
|
||||
server=/localnet/8.8.8.8
|
||||
server=/localnet/8.8.4.4
|
||||
domain-needed
|
||||
interface=eth0
|
||||
strict-order
|
||||
min-port=4096
|
||||
cache-size=10000
|
||||
log-queries
|
||||
bogus-priv
|
||||
@@ -1,2 +0,0 @@
|
||||
address=/ads.hulu.com/192.168.1.101
|
||||
address=/ads-v-darwin.hulu.com/192.168.1.101
|
||||
@@ -1,8 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Pi-hole blocked an ad</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>No ads here</h1>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,32 +0,0 @@
|
||||
server.modules = (
|
||||
"mod_access",
|
||||
"mod_alias",
|
||||
"mod_compress",
|
||||
"mod_redirect",
|
||||
# "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"
|
||||
|
||||
$HTTP["host"] =~ "ads.hulu.com|ads-v-darwin.hulu.com|" {
|
||||
url.redirect = ( "^/(.*)" => "http://192.168.1.101:8200/MediaItems/19.mov")
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
media_dir=V,/var/lib/minidlna/videos/
|
||||
port=8200
|
||||
friendly_name=pihole
|
||||
serial=12345678
|
||||
model_number=1
|
||||
inotify=yes
|
||||
@@ -1,6 +0,0 @@
|
||||
# !/bin/bash
|
||||
# DNS config file
|
||||
# Run as a local script since modifying it will disconnect the Internet connection
|
||||
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
|
||||
sudo mv /etc/dnsmasq.conf.pihole /etc/dnsmasq.conf
|
||||
sudo service dnsmasq start
|
||||
@@ -1,71 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Block Hulu Plus ads using a Raspberry Pi
|
||||
|
||||
# Install with this command (from the Pi):
|
||||
#
|
||||
# curl -s https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/block%20hulu%20ads/setup.sh | bash
|
||||
#
|
||||
# Or run the commands below in order
|
||||
|
||||
# Update the Pi
|
||||
sudo apt-get update
|
||||
#sudo apt-get -y upgrade
|
||||
|
||||
# Install DNS
|
||||
sudo apt-get -y install dnsutils dnsmasq
|
||||
sudo service dnsmasq stop
|
||||
|
||||
# Install Web server
|
||||
sudo apt-get -y install lighttpd
|
||||
sudo service lighttpd stop
|
||||
|
||||
# Install streaming software
|
||||
sudo apt-get -y install minidlna
|
||||
sudo service minidlna stop
|
||||
|
||||
# Configure Web server
|
||||
#sudo lighty-enable-mod fastcgi-php
|
||||
sudo chown www-data:www-data /var/www
|
||||
sudo chmod 775 /var/www
|
||||
sudo usermod -a -G www-data pi
|
||||
sudo mv /var/www/index.lighttpd.html /var/www/index.lighttpd.orig
|
||||
sudo curl -o /var/www/index.html "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/block%20hulu%20ads/index.html"
|
||||
sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
|
||||
sudo curl -o /etc/lighttpd/lighttpd.conf "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/block%20hulu%20ads/lighttpd.conf"
|
||||
|
||||
# Configure streaming service
|
||||
sudo mv /etc/minidlna.conf /etc/minidlna.conf.orig
|
||||
sudo mkdir /var/lib/minidlna/videos/
|
||||
sudo curl -o /etc/minidlna.conf "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/block%20hulu%20ads/minidlna.conf"
|
||||
sudo service minidlna start
|
||||
sudo curl -o /var/lib/minidlna/videos/pi-hole.mov "https://dl.dropboxusercontent.com/u/16366947/Documents/Videos/pi-hole.mov"
|
||||
sudo service minidlna force-reload
|
||||
tail /var/log/minidlna.log
|
||||
|
||||
# Configure DNS
|
||||
sudo curl -o /etc/dnsmasq.conf.pihole "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/dnsmasq.conf"
|
||||
sudo curl -o /tmp/piholedns.sh "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/block%20hulu%20ads/setup-resolv.sh"
|
||||
sudo chmod 755 /tmp/piholedns.sh
|
||||
|
||||
# Download [advanced] ad-blocking script and then run it
|
||||
# http://jacobsalmela.com/raspberry-pi-ad-blocker-advanced-setup/
|
||||
sudo curl -o /usr/local/bin/gravity.sh "https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/gravity-adv.sh"
|
||||
sudo chmod 755 /usr/local/bin/gravity.sh
|
||||
clear
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Go get some coffee--this will take a while"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
sleep 5
|
||||
sudo /usr/local/bin/gravity.sh
|
||||
sudo service dnsmasq stop
|
||||
|
||||
# Restart everything to apply all the changes
|
||||
sudo service lighttpd start
|
||||
sudo service minidlna start
|
||||
sudo /tmp/piholedns.sh
|
||||
Reference in New Issue
Block a user