diff --git a/README.md b/README.md index a0bf4cc3..7e938834 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,18 @@ # Automated Install -##### Designed For Raspberry Pi B, B+, 2, and Zero (with an Ethernet adapter) +##### Designed For Raspberry Pi A+, B, B+, 2, and Zero (with an Ethernet adapter) 1. Install Raspbian 2. Run the command below ### ```curl -L install.pi-hole.net | bash``` +#### Alternative Semi-Automated install #### +``` +wget -O basic-install.sh install.pi-hole.net +chmod +x basic-install.sh +./basic-install.sh +``` + Once installed, [configure your router to have **DHCP clients use the Pi as their DNS server**](http://pi-hole.net/faq/can-i-set-the-pi-hole-to-be-the-dns-server-at-my-router-so-i-dont-have-to-change-settings-for-my-devices/) and then any device that connects to your network will have ads blocked without any further configuration. Alternatively, you can manually set each device to [use the Raspberry Pi as its DNS server](http://pi-hole.net/faq/how-do-i-use-the-pi-hole-as-my-dns-server/). ## Pi-hole Is Free, But Powered By Your Donations diff --git a/adlists.default b/adlists.default index dd391357..c2385f7e 100644 --- a/adlists.default +++ b/adlists.default @@ -6,3 +6,12 @@ http://pgl.yoyo.org/adservers/serverlist.php? http://someonewhocares.org/hosts/hosts http://winhelp2002.mvps.org/hosts.txt http://mirror1.malwaredomains.com/files/justdomains +http://securemecca.com/Downloads/hosts.txt +https://hosts.neocities.org/ +http://sysctl.org/cameleon/hosts +https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist +https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt +https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt +http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt +https://raw.githubusercontent.com/quidsup/notrack/master/trackers.txt + diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 1cffab76..bc027cbd 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -303,35 +303,40 @@ setDNS(){ } versionCheckDNSmasq(){ - # Check if /etc/dnsmasq.conf is from pihole. If so replace with an original and install new in .d directory - dnsFile1="/etc/dnsmasq.conf" - dnsFile2="/etc/dnsmasq.conf.orig" - dnsSearch="addn-hosts=/etc/pihole/gravity.list" - - # Check if /etc/dnsmasq.conf exists - if [ -d "/etc/dnsmasq.conf" ]; then - # If true, Check dnsmasq.conf for pihole magic - if grep -q $dnsSearch $dnsFile1; then - # If true, Check dnsmasq.conf.orig for pihole magic - if grep -q $dnsSearch $dnsFile2; then - # If true, use advanced/dnsmasq.conf.original - $SUDO mv -f /etc/dnsmasq.conf /etc/dnsmasq.conf.orig - $SUDO cp /etc/.pihole/advanced/dnsmasq.conf.original /etc/dnsmasq.conf - else - # If false, mv original file back - $SUDO mv -f /etc/dnsmasq.conf.orig /etc/dnsmasq.conf - fi - # If false, This is a fresh install - fi - else - # If false, use advanced/dnsmasq.conf.original - $SUDO cp /etc/.pihole/advanced/dnsmasq.conf.original /etc/dnsmasq.conf - fi - - $SUDO cp /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/01-pihole.conf - $SUDO sed -i "s/@INT@/$piholeInterface/" /etc/dnsmasq.d/01-pihole.conf - $SUDO sed -i "s/@DNS1@/$piholeDNS1/" /etc/dnsmasq.d/01-pihole.conf - $SUDO sed -i "s/@DNS2@/$piholeDNS2/" /etc/dnsmasq.d/01-pihole.conf + # Check if /etc/dnsmasq.conf is from pihole. If so replace with an original and install new in .d directory + dnsFile1="/etc/dnsmasq.conf" + dnsFile2="/etc/dnsmasq.conf.orig" + dnsSearch="addn-hosts=/etc/pihole/gravity.list" + + defaultFile="/etc/.pihole/advanced/dnsmasq.conf.original" + newFileToInstall="/etc/.pihole/advanced/01-pihole.conf" + newFileFinalLocation="/etc/dnsmasq.d/01-pihole.conf" + + if [ -f $dnsFile1 ]; then + echo -n "::: Existing dnsmasq.conf found..." + if grep -q $dnsSearch $dnsFile1; then + echo " it is from a previous pi-hole install." + echo -n "::: Backing up dnsmasq.conf to dnsmasq.conf.orig..." + $SUDO mv -f $dnsFile1 $dnsFile2 + echo " done." + echo -n "::: Restoring default dnsmasq.conf..." + $SUDO cp $defaultFile $dnsFile1 + echo " done." + else + echo " it is not a pi-hole file, leaving alone!" + fi + else + echo -n "::: No dnsmasq.conf found.. restoring default dnsmasq.conf..." + $SUDO cp $defaultFile $dnsFile1 + echo " done." + fi + + echo -n "::: Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf..." + $SUDO cp $newFileToInstall $newFileFinalLocation + echo " done." + $SUDO sed -i "s/@INT@/$piholeInterface/" $newFileFinalLocation + $SUDO sed -i "s/@DNS1@/$piholeDNS1/" $newFileFinalLocation + $SUDO sed -i "s/@DNS2@/$piholeDNS2/" $newFileFinalLocation } installScripts() { @@ -351,11 +356,10 @@ installScripts() { installConfigs() { # Install the configs from /etc/.pihole to their various locations $SUDO echo ":::" - $SUDO echo -n "::: Installing configs..." + $SUDO echo "::: Installing configs..." versionCheckDNSmasq $SUDO mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig $SUDO cp /etc/.pihole/advanced/lighttpd.conf /etc/lighttpd/lighttpd.conf - $SUDO echo " done." } stopServices() { @@ -389,7 +393,7 @@ checkForDependencies() { fi echo ":::" echo -n "::: Checking apt-get for upgraded packages...." - updatesToInstall=$(sudo apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst) + updatesToInstall=$($SUDO apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst) echo " done!" echo ":::" if [[ $updatesToInstall -eq "0" ]]; then diff --git a/block hulu ads/lighttpd.conf b/block hulu ads/lighttpd.conf index 9e8d1f80..636fd07d 100644 --- a/block hulu ads/lighttpd.conf +++ b/block hulu ads/lighttpd.conf @@ -38,6 +38,6 @@ 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" { +$HTTP["host"] =~ "ads.hulu.com|ads-v-darwin.hulu.com|ads-e-darwin.hulu.com" { url.redirect = ( ".*" => "http://192.168.1.101:8200/MediaItems/19.mov") }