freedombone/doc/EN/app_pihole.org

4.2 KiB

/free/freedombone/src/commit/f608c47b90af618e42d6a1cf190f525b3f700e70/doc/EN/images/logo.png

PI-Hole: The Black Hole for Web Adverts

Idiots who have an inflated sense of self-entitlement will tell you that it's your moral duty to view their mind-numbingly tedious corporate ads on their web site or YouTube channel, or else their kids will starve and the sky will fall because their revenue stream will dry up. But that's bullshit. There is nothing intrinsic or morally mandatory about adverts propping up the livelihoods of netizens, and indeed a web not primarily based on advertising money might have been a much better and more interesting place by now, with a lot less spying.

Not only are web ads annoying, but they can consume a lot of bandwidth, be a privacy problem in terms of allowing companies to track your browsing habits and also any badly written scripts they contain may introduce exploitable security holes. Also if you're poor then adverts often make you want things that you can't have.

You can block ads for any devices connected to your local network by installing the pihole app from Add/Remove Apps on the administrator control panel. This may help to improve overall performance of your devices by not wasting time downloading unwanted images or scripts.

Also don't expect perfection. Though many ads may be blocked by this system some will still get through. It's a constant cat and mouse game between advertisers and blockers.

Set a static IP address

Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually 192.168.1.1 or 192.168.1.254.

When that's done select About this system from the control panel and see the IPv4 address. You can use this as a DNS address in two ways:

On each client system within your local network

Make sure that you add the static IP address for the server to /etc/hosts.

STATIC_IP=[your server static IP]
sudo echo "$STATIC_IP [your domain name]" >> /etc/hosts

On Arch/Parabola:

sudo pacman -S openresolv
sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
sudo chattr -i /etc/resolv.conf
sudo resolvconf -u

Or on a Debian based system:

sudo apt-get install resolvconf
echo 'domain localdomain' > /tmp/resolvconf
echo 'search localdomain' >> /tmp/resolvconf
echo "nameserver $STATIC_IP" >> /tmp/resolvconf
sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
sudo chattr -i /etc/resolv.conf
sudo resolvconf -u

On your internet router

If you can access the settings on your local internet router then this is the simplest way to provide ad blocking for all devices which connect to it. Unfortunately some router models don't let you edit the DNS settings and if that's the case you might want to consider getting a different router.

Edit the DNS settings and add the IPv4 address which you got from the control panel About screen. Exactly how you do this will just depend upon your particular router model. You may also need to set the same address twice, because two addresses are conventional.

LibreCMC

On a router running LibreCMC from the Network menu select DHCP and DNS. Enter the static IP address of your Freedombone system within DNS Forwardings, then at the bottom of the page click on Save & Apply. Any devices which connect to your router will now have ad blocking.

Configuring block lists

You can configure the block lists which the system uses by going to the administrator control panel, selecting App Settings then choosing pihole. You can also add any extra domain names to the whitelist if they're being wrongly blocked or to the blacklist if they're not blocked by the current lists.

Return to the home page