Installing Pihole for networkwide adblocking

Pi-hole is a network wide adblocker, it acts as a DNS server for devices on your network, and will block advertisements.

Installing pihhole

Installation of pihole couldn’t be simpler. Install curl, then run the following curl command, and follow the directions.

apt-get install curl
curl -sSL https://install.pi-hole.net | bash
  • Enter DNS servers (I suggest running namebench on a local pc to determine best DNS server for your location)
  • Use Space to deselect IPV6 (Unless you’re using it) then press ok
  • Select to keep, or change your IP address. Default gateway should be auto filled in with your routers ip address.
  • Ensure web admin interface is enabled and click ok
  • Ensure logging is enabled, and click ok

Now pi-hole will install. This wont take long. Once done, save the password supplied as you’ll need it to login to the web panel.

Navigate to the IPADDRESS_OF_PIHOLE/admin to login, change password and view stats.

Note: Replace IPADDRESS_OF_PIHOLE with the IP Address of your Pihole server

Once logged in you’ll be greeted with the following panel, detailing states regarding client DNS queries.

pihole

Now change the IP Address of your clients to use this server as their DNS server. This is best done on your router, so all devices are supplied your adblocking dns server.

Whitelisting or Blacklisting domains

There are two methods for whitelisting domains in pihole. First is through the web interface above, second is through terminal with the following command

pihole -w domain.com domain2.com domain3.com

you can also blacklist domains with

pihole -b domain.com domain2.com domain3.com

For other commands run

pihole -h

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s