Pi-Hole Information

Disclaimers

First, some important disclaimers:

S-City Tech DOES NOT own or hold copyright, in whole or in part, in the Pi-Hole project or Raspbian operating system, or components thereof.

S-City Tech only owns and holds copyright in it’s own blocklist (found here), which they maintain as an OPTIONAL ADDON to the Pi-Hole software.

S-City Tech IS NOT affiliated with the Raspberry Pi Foundation or Pi-hole LLC in any way.

Raspberry Pi, and the logo thereof, are trademarks of the Raspberry Pi Foundation. Pi-hole, and the logo thereof, are trademarks of Pi-hole LLC.

This Product is Powered by Raspberry Pi hardware

Index

  1. Add Your WiFi
  2. First Boot
  3. Install PiHole
  4. Network Configuration
  5. Make Your Own
  6. Addon

Basic Setup

Note: Do you want to build your own? Find out how

These are instructions for basic setup when you get your Pi-Hole ad blocker from us

Add your WiFi details

NOTE: You don’t need to do this if you sent us your WiFi details

You’ll need a computer or laptop with an SD card reader for this!

  1. Remove the top layers of the Pi’s case until you can remove the SD card
  2. Connect your SD card to your computer
  3. Your SD card (or part of it, if you’re on Linux) should show up as ‘BOOT’
  4. Open up your SD card, and look for files like bcm2708-rpi-zero-w.dtb, which will verify that your using the right disk
  5. Enter your details below and copy the output

NOTE: Only YOU can see this information – it’s not sent to us. You can also copy the output without updating it, and replace the text between the quote marks [ “” ] with your WiFi details from inside a text editor, if you wish. Remember to leave the quote marks, though!

Generate a WiFi config file

Update the Text

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid=”mywifiname
psk=”mywifipass
}

  1. Paste the output into a text file and save it to your SD card, with the name “wpa_supplicant.conf”
  2. That’s it! Eject your SD card, pop it back in your Pi and re-assemble the case!

Setup your Pi

When you first boot your Pi, you should first do some maintenance and optional security changes:

WARNING! First boot process can take up to 2 minutes, DO NOT turn off your Pi during this time as you’ll corrupt the data on the SD card – trust us, we found out the hard way!

  1. Plug in and turn on your Pi, and, on another computer, smartphone or tablet, use an app like PuTTY (no affiliation) to connect to SSH. Hint: you don’t need to know the IP address yet! Use ‘raspberrypi.local’ as the IP address for now. If asked for a port, enter 22.
  2. Next, update your Raspberry Pi with the following command: $ sudo apt update && sudo apt upgrade, you’ll be asked to confirm this action by typing ‘y’.
  3. Next, type in $ sudo raspi-config, and use arrow keys to navigate around (we’re unfortunately not sure how to do this on mobile yet – we’ll do some research and update this page).
  4. Navigate to ‘Change User Password’, type a new password and press Enter to confirm it
  5. Navigate to Network -> Hostname and type something new – we used ‘pihole’, then press Enter to confirm it
  6. Navigate to Advanced Options -> Memory Split and type 16, then press Enter to confirm it. This is because your Pi has no GUI so doesn’t need video memory – it’ll help a tiny little bit with speed
  7. You’ll need to reboot your Pi now to apply the changes – press the right arrow twice and press Enter to confirm – then press Enter again to confirm a reboot

If you’re an advanced user, you can make some more customisations here before you install and start the ad-blocker server.

Installing the Ad Blocker

Next, you’ll need to reconnect and download the ad-blocking software. Here are instructions for how to do that:

  1. Give it about 30 seconds then reconnect the same way as above
  2. Type $ sudo curl -sSL https://install.pi-hole.net | bash to begin the installation
  3. When asked to “choose an interface”, choose wlan0, which is the name for the WiFi connection
  4. When asked to choose an “Upstream DNS provider”, we recommend Google, as it’s the most reliable and quickest to update with new sites or changes to sites – but you can use any that you want
  5. Next, it’ll ask you to choose lists, all of them selected is the most secure option, but if you don’t want to use any for any reason, navigate to them and press Enter, the asterisk (*) should disappear. When you’ve made your selection, press the right arrow and press Enter to confirm
  6. Next, you’ll need to fix your Pi’s IP address, otherwise Pi-Hole won’t work properly – take note of the IP address that’s listed – you’ll need it to use your new ad blocker
  7. You can safely ignore the FYI – your Pi will be on most of the time anyway so the IP is unlikely to be reassigned – during the over 30 days of testing we did, we didn’t run into any IP conflict while using a £16 Tp-link router with only very basic features – nevertheless advanced users can create a DHCP address reservation for their Pi if they’d like, to prevent anything except the Pi receiving the IP address – but we won’t detail that here as it’s a complex procedure that’s different for every router
  8. When asked if you’d like to install the web interface, you absolutely should – essential settings and more are managed by this interface, the option to skip installing the web interface is intended for developers who want to use their own interface
  9. Next, you’ll be asked to choose a privacy mode for the logs and statistics – this is purely the preference of individual users
  10. You don’t need to remember the randomly generated password – press Enter to close the dialog and type $ sudo pihole -p, so that you can set a password that’s much easier to remember

Now, you can close your SSH connection with $ logout, login to your Pi-Hole via a web browser by entering it’s IP address that you copied earlier into the address bar, followed by ‘/admin’ – for example ‘192.168.0.22/admin’ was ours.

Configuring the network

This is the tricky part – and just to make it worse it’s unique to every router. The below process is for a Tp-Link router, but it should be similar for other router designs:

TP-Link Login Screen

NOTE: It may be helpful to search Google for your router’s landing page, login details and DNS settings then use those in place of the following instructions, which are Tp-Link centric.

To see your router’s landing or login page, you should navigate to 192.168.0.1 or 192.168.1.1, depending on your router. Most routers use the username “admin” and then either “admin” or “password” for the password, as default – of course, if you’ve changed it you’ll need to use your own details.

From there, you should be able to choose “DHCP > Settings” and then edit “DNS Server” or “Primary DNS Server” to match the IP address of your Pi:

The DHCP options page of our TP-Link router

If you have a second DNS option, as above, you should NOT set it! If you do, when your Pi reports that a website is blocked, your network will ask the secondary server instead – rendering the Pi essentially useless. From there, hit “Save” and close the tab – the router will probably reboot.

That’s it! Your Pi should now work network-wide, and you shouldn’t see any ads on any devices on your network.

But wait! Did you know you can make your own?

To begin, you’ll need your own Raspberry Pi, case, power supply, SD card, separate computer and so on.

  1. First, download Raspbian Lite (without a desktop) from here
  2. Flash the ISO file to your SD card from a program like Belena Etcher from here (not affiliated), which we recommend as it protects large drives like hard drives and SSDs from being flashed accidentally
  3. Create a text file in a text editor like Notepad called “wpa_supplicant.conf” and paste the output from here into it, saving it into the SD card
  4. Create another file in a similar way called “ssh” and save it to the SD card one again, but make sure to leave it empty!
  5. Eject the SD card and put it in your Pi
  6. Assemble your Pi’s case & connect it
  7. Follow the First Boot process above

Our optional add-on:

We’ve made our own blocklist, that anyone (yes, anyone!) can contribute to. If you’d like to add a website to this blocklist, simply enter it in the box below, and we’ll review it. If the URL meets either of the following criteria, we’ll add it for everyone to use:

  • A provably-dangerous website, e.g. phishing or virus hosts
  • A website that hosts ads for other sites

How to add the list to your PiHole:

How to add Blocklist to your Pi-Hole manually
  1. Login to your PiHole in a browser, via it’s IP address
  2. Navigate to the settings page and choose the blocklists tab
  3. Enter ‘https://s-city.tech/blocklist’ in the textbox
  4. Press Save & Update to finish!