Jump to content
47 minutes ago, obnoxiousmedic said:

Hey there! Just wanted to ask if there's an updated version of this guide for 2024.

Not much has changed? 

 

Happy to help you if you get stuck

 

Real stupidity beats artificial intelligence every time.

- Sir Terry Pratchett

Link to post
Share on other sites

55 minutes ago, gentlemanspot said:

Not much has changed? 

 

Happy to help you if you get stuck

Any chance you have a guide for setting it up in an UnRaid server? I'm new to UnRaid/Docker and all this port management stuff is getting very confusing.  

I'm getting up to the webUI... but then what? some of the buttons/options aren't here.

Link to post
Share on other sites

3 hours ago, obnoxiousmedic said:

Any chance you have a guide for setting it up in an UnRaid server? I'm new to UnRaid/Docker and all this port management stuff is getting very confusing.  

I'm getting up to the webUI... but then what? some of the buttons/options aren't here.

Ah right, 

 

Yeah i've had Pihole in docker and running on a debian VM.  i just spun one up in a VM on my lab stack 

 

Not much to do.  I'm not an Unraid guy but I'm guessing there is an App for it 

 

 

1. Set a static IP for your Pihole

 

 

2. web UI if you can get to the WEB UI that half great you just need to point your network traffic to it. 

 

 

3. Set DNS setting in the pihole 

image.png.d06cf113eab2e10990e0bae743e6925c.png

4. test with one PC before changing your router DNS setting 

 - in my lab my pihole is running on 192.168.20.122 so on my test VM i have set the DNS to point to the pihole 

image.png.65bdab64f2f6a50f148f7a7e6992a45e.png

 

 

4.  test with an NSLOOKUP 

image.png.9aba988b0f94648a5a672a1b61ca79da.png

you can see that Pihole is the server and that it can look up google, this tells me that pihole is pi holing 

 

 

 

 

5. add block lists i have like 6  and test again! 

image.thumb.png.bd04a013ce729659304ad0c53e4740c2.png

 

 

 

6. once happy you can change your routers DNS to point to the pihole i would also sujest using 1.1.1.1 or 8.8.8.8 as your 2nd DNS in case your turn off your pihole

 

 

bonus: 

 

wife/parnter setting  add the google services to the white list, allowing for ad's to be clicked on in Google searches ... was not a hill i was going to die on! 

 

image.thumb.png.c40ff0bfe5be5f8fb8cfcff7c8646b64.png 

 

HOPE this helps, happy to provide more context if needed 

 

 

Real stupidity beats artificial intelligence every time.

- Sir Terry Pratchett

Link to post
Share on other sites

  • 3 weeks later...
On 8/16/2019 at 11:11 PM, jakkuh_t said:

This is an accompanying guide for our recent video trying out Pi-Hole.

 

Note: Image links will be coloured like this: https://google.ca 

 

 

Parts List:

  • Raspberry Pi (any model)
    • We will be using a Raspberry Pi Zero (https://lmg.gg/8KV3n) - $5
    • You can optionally install Pi-Hole in a docker container, or inside a VM, but we will be assuming you are using a Raspi for the rest of this tutorial.
  • Micro SD Card (2gb+, but you should probably just buy a 16GB card because they're so cheap)
  • 2.5A Micro USB AC Power Supply
    • You can get these really cheap on eBay, but we aren't making any promises about quality. AdaFruit has a solid one: https://lmg.gg/8KVm8
  • *Optional*: Micro USB to RJ45 Ethernet Adapter
    • This is in case the RasPi you are using doesn't have an ethernet port or WiFi (if you're using the Pi Zero, you will need one of these)
  • *Optional*: Other stuff that you might need:
    • SD/uSD Card Reader (Unless your laptop, or you already has one)
    • Ethernet Cable (Unless you're using WiFi, you will need one of these)
    • Case for your Raspberry Pi Model (Nice to have to keep it protected, but cardboard also works)
    • Heat sinks for your Raspberry Pi (Nice to have to keep it cool, also helpful if you want to overclock your Pi)
    • A display connection for your Pi (Pi Zero's use Mini HDMI) (We will be doing a headless install, so this is not necessary)

 

Stage 1 - OS Install/Setup:

  1. Before we can install Pi-Hole or anything else really, we have to setup our operating system of choice: Raspbian Buster Lite (stretch also works)
    1. Download and unzip the "Raspbian Buster Lite" image from the Raspbian website: https://www.raspberrypi.org/downloads/raspbian/
    2. Download and install balenaEtcher, our uSD card writer/burner of choice: https://www.balena.io/etcher/
    3. Plug in your uSD card
    4. Launch balenaEtcher, select the Raspbian Buster Lite image, your uSD card, and then click Flash. (https://i.imgur.com/GMSZj8Z.png)
  2. If you're doing a headless install like us (no monitor/keyboard required), you'll need to enable SSH before booting up the Raspberry Pi
    1. Replug your uSD card to allow Windows to recognize the new Raspbian partition layout
    2. You should have a lettered drive pop up marked as "boot" (https://i.imgur.com/4ar0ih3.png)
      1. If you don't, ensure your uSD is being detected in Disk Management (https://i.imgur.com/ZPmyyz6.png)
      2. Then assign the partition a drive letter: https://lmg.gg/8KVm6
    3. Create a file inside the "boot" folder called "ssh" with no extension (https://i.imgur.com/KDyB4nc.png)
      1. If you don't know how to make an extension-less file you can download it here: https://lmg.gg/8KVmb
  3. Plug your uSD card into the Raspberry Pi followed by networking, and then power.
  4. Since we're doing a headless install, we'll need to search for our raspberrypi's IP address so we can access it over SSH.
    1. If you know what you're doing, log in to your router's admin page and check the DHCP client/reservation list for "raspberrypi"
    2. If you don't know how to do the above, download Angry IP scanner and run it: https://lmg.gg/8KVmS
    3. Look for the hostname "raspberrypi", on that line the IP and MAC address of our Raspberry Pi will also be listed: 10.20.0.77 in our case (https://i.imgur.com/lK2ce0R.png)
  5. Now that we've found our Raspberry Pi's IP address + MAC Address, we need to assign it an INTERNAL/LOCAL static IP address.
    1. This process is going to vary wildly based on which router/DHCP server you use, so we'd recommend Googling your router's model name/number (can be found on the back) + "how to set static IP" (ex: "Netgear R7000 how to set static ip").
    2. If you're willing and somewhat tech savvy, you might also be able to figure it out on your own.
      1. Start by navigating to your router's admin page. The IP for this is typically located on a sticker on the back of your ISP's provided router (along with the admin page's default username and password), but you can also find it by running the command "ipconfig" in command prompt on a Windows PC. Your router's IP will be listed after "default gateway" (https://i.imgur.com/S2Ndc0w.png)
      2. Log in to the admin page either with the Iogin credentials listed on the back of the router, or by googling the model number of the router along with "default password". Some routers use a randomly generated default password, so googling will not work for those.
      3. Once logged in, look for a tab labeled "DHCP Reservation", "Static IP Assignment", or something along those lines. (https://i.imgur.com/FeMjd4V.png) You may have to go to the Advanced menu to access this. (https://i.imgur.com/6l4kIqH.png)
      4. Enter the MAC address we grabbed earlier with Angry IP scanner, and then enter/select your desired static IP address (make sure you're using something not taken by another device on your network). (https://i.imgur.com/znUTbKv.png)
      5. Hit Apply (or whatever the equivalent is for your router) 
  6. Re-plug the power connection for your Raspberry Pi, to allow it to restart and fetch it's newly assigned IP.
  7. To access the Raspberry Pi over SSH we will need to download and connect to it with an SSH client
    1. Download, install and then launch the SSH client of your choice.
      1. We will be using PuTTY because it's simple, but any SSH client will do: https://lmg.gg/8KVmQ (https://i.imgur.com/POLV3i4.png)
    2. Enter the newly assigned static IP address of your Raspberry Pi into PuTTY, and click "Open" (https://i.imgur.com/BegMcKC.png)
    3. After it prompts you with "login as:" enter "pi" (https://i.imgur.com/jfULCu5.png)
    4. Then for password, enter "raspberry". You should now be logged in over SSH. :D (https://i.imgur.com/Q058Sbw.png)
  8. Now that we're logged in over SSH, start by changing the default password, and updating the Raspberry Pi.
    1. To change the user password enter the command "passwd" and press enter.
      1. You'll then be prompted to enter the current password (this is "raspberry" so enter that)
      2. Then enter your desired new password
    2. To update the Raspberry Pi, run the command "sudo apt update" - this is going to update the package list to tell us if anything needs to be update. (https://i.imgur.com/ECpLG93.png)
      1. Then, to actually upgrade the packages now that the package manager knows which ones need updating, run "sudo apt upgrade -y". (https://i.imgur.com/EYfDhkC.png)
  9. Our Raspberry Pi is now updated, set to a secure password and ready to install Pi-Hole onto! :D

 

Stage 2 - Pi-Hole Install/Setup (this is where the tutorial portion in the video starts)

  1. With our RasPi's OS, internet, and SSH ready to go, we can now install Pi-Hole. 
    1. Copy the Pi-Hole install command from their website, paste it into the SSH client, and click Enter to run it: https://lmg.gg/8KVm9 (https://i.imgur.com/P20CP2I.png)
    2. The installer will spit out some status updates until you're brought to the configuration screen (https://i.imgur.com/t0DHzHo.png)
    3. Press Enter until you get to the "Choose An Interface" page. The default "eth0" interface for Ethernet users should be selected by default. Press Enter to continue.
      1. ("wlan0" should be selected if you're using WiFI - keep in mind WiFi installation is not supported in this tutorial, but if you have some decent Google-Fu you should be able to figure it out)
    4. On the next screen, select your upstream DNS provider. This is where requests will be forwarded if they're not blocked by Pi-Hole (ie. if they're not found in it's block/black lists). We will be using Google DNS, and if you don't know what this means, stick with that. Press Enter to continue.
    5. The following screen allows you to select which of the default block list's you'd like to use. We will leave these all on, but you can use your arrow keys and space bar to (de)select any of them as you wish. Press Enter to continue.
    6. Next up, it will ask you if which IP protocols you want to block ads over, leave this at the default unless you know what you're doing. Press Enter to continue.
    7. The next screen will list the IP address of the Raspberry Pi and the IP of your router, assuming you've set a static IP, just click Enter to continue.
      1. If you get a screen about an IP conflict, just ignore it and click Enter to continue.
    8. You'll then be asked about the web interface, web server, and logging modes. Leave these all at default by clicking Enter.
    9. After all that, Pi-Hole is going to do a bunch of stuff, and it might take a couple minutes so sit back until you're greeted with an "Installation Complete!" page. This will list the IP and password for the Pi-Hole web interface.
  2. Copy the IP into your browser, and log with the listed password. Huzzah! You now have a functioning Pi-Hole installation :D 

 

Stage 3 - Setting Up Pi-Hole to Run on Your Devices / Whole Network

  1. To enable Pi-Hole on a device-by-device basis, you'll need to manually set the DNS IP address in your device settings. 
    1. For each of these, substitute the IP in the tutorial for the IP of your Raspberry Pi
      1. How to set DNS on an iPhone: https://lmg.gg/8KVmw
      2. How to set DNS on Android phones (your phone manufacturers skin may slightly vary): https://lmg.gg/8KVmh
  2. To enable Pi-Hole on a Router level, meaning it will work on all your devices automatically, you'll need to configure your router's DHCP server's default DNS settings.
    1. This process is going to vary wildly based on which router/DHCP server you use, so we'd recommend Googling your router's model name/number (can be found on the back) + "how to set DNS servers" (ex: "Netgear R7000 how to set DNS servers").

 

Stage 4 - Using Pi-Hole + Common Whitelisting

  1. To enable some common whitelisted false-positives run the command listed here: https://github.com/anudeepND/whitelist
  2. For some great info on the Pi-Hole web interface read the lower portion of this tutorial: https://www.smarthomebeginner.com/pi-hole-tutorial-whole-home-ad-blocking/#Configuring_Your_Router_8211_Whole_Home_Ad_Blocking 

Hey Jake and eryone else I really need your help. So I am new to this so please be gentle with me. So I was following this guide to get finally rid of ads and I ended up stuck at loging in SSH for some reason it says that access is denied so I tought meaby I did somthing wrong. I unplaged my PI zero 2w from the power and I delited everything from my memory card, formated it again and tryed again but this time my PI zero 2w is not even turning on. I read online that ussualy means my SD card is problem. So yea I am worried. Did I corrupt my card? what do I do now? can anyone help me. Also that Ruspian buster lite I don't know where to find that. Just if anyone can guid me step by step I would apriciate it. Please help me. I just hope I didn't burn my Pi but i doubt it. I was really carefull to not blow any fuses. 

Link to post
Share on other sites

22 hours ago, pask0o0 said:

I delited everything from my memory card, formated it again

22 hours ago, pask0o0 said:

Did I corrupt my card?

Did you put a RasPi image back onto the card? Or did you leave it wiped?

Main System (Byarlant): Ryzen 9 5950X | Asus B550-Creator ProArt | EK 240mm Basic AIO | 32GB G.Skill DDR4 3600MT/s CL16 | XFX Speedster SWFT 210 RX 6600 | Samsung 990 PRO 2TB / Samsung 990 EVO Plus 4TB | Corsair RM750X | StarTech 4× USB 3.0 Card | Realtek RTL8127 10G NIC | Hyte Y60 Case | Dell U3415W Monitor | Keychron K12 Blue (RGB backlight)

 

Laptop (Narrative): Lenovo Flex 5 81X20005US | Ryzen 5 4500U | 16GB DDR4 3200MT/s (soldered) | Vega II 384SP Graphics | SKHynix P31 1TB NVMe SSD | Intel AX200 Wifi | Asus 2.5G USB NIC | Asus ProArt PA278QV | Keychron K4 Brown (white backlight)

 

Proxmox Server (Veda): Ryzen 7 3800XT | ASRock Rack X470D4U | Corsair H80i v2 | 128GB Micron DDR4 ECC 3200MT/s | 2× Samsung PM963a 960GB SSD / 4× WD 10TB / 4× Seagate 14TB Exos / 4× Micron MX500 2TB / 8× WD 12TB (custom external SAS enclosure) | Seasonic Prime Fanless 500W | Intel X550-T2 10G NIC | LSI 9300-8i HBA | Adaptec 82885T SAS Expander | Fractal Design Node 804 Case

 

Proxmox Server (La Vie en Rose)GMKtec Mini PC | Ryzen 7 5700U | 32GB Lexar DDR4 (SODIMM) | Vega II 512SP Graphics | Lexar 1TB 610 Pro SSD | 2× Realtek 8125 2.5G NICs


Media Center/Video Capture (Jesta Cannon): Ryzen 5 1600X | ASRock B450M Pro4 R2.0 | Noctua NH-L12S | 16GB Crucial DDR4 3200MT/s | EVGA GTX750Ti SC | UMIS NVMe SSD 256GB / TEAMGROUP MS30 1TB | Corsair CX450M | Viewcast Osprey 260e Video Capture | TrendNet (AQC107) 10G NIC | LG WH14NS40 BD-ROM | Silverstone Sugo SG-11 Case | Sony XR65A80K

 

Workbench (Doven Wolf): Lenovo m715q | Ryzen Pro 3 2200GE | 16GB Crucial DDR4 3200MT/s (SODIMM) | Vega 8 Graphics | SKHynix (OEM) 256GB NVMe SSD | uni 2.5G USB NIC | HDMI add-in module

 

Network:

Spoiler
                       ┌─────────────── Office/Rack ───────────────────────────────────────────────┐
Google Fiber Webpass ── Cloud Gateway Max ══╦═ Pro XG 8 ══╦═ Flex 2.5-8 ══╦═ Doven Wolf
                      La Vie en Rose (DNS) ═╬═ Narrative  ╠═ Veda-NAS     ╠═ La Vie en Rose (vmbr)
                                Veda (DNS) ─┘             ╠═ Veda (vmbr)  ├─ Ptolemy (vmbr)
╔═════════════════════════════════════════════════════════╩═ Ptolemy-NAS  ├─ Veda (Mgmt)
║   ┌ Closet ┐      ┌───────── Bedroom ─────────┐                         └─ Veda (IPMI)
╚═══ Flex XG ══╦╤═══ Flex XG ══╤╦═ Byarlant
       (PoE)   ║│              │╠═ Narrative 
Kitchen Jack ══╣└─ Dual PoE ┐  │╚═ Jesta Cannon*
   (Testing)   ║┌─ Injector ┘  └── Work Laptop
     Bedroom ══╝│        ┌─────── Media Center ────────────────────────────┐
     Jack #2    └──────── Switch 8 ────────────┬─ nanoHD Access Point (PoE)
Notes:                                         ├─ Sony PlayStation 4 
─── is Gigabit / ═══ is Multi-Gigabit          ├─ Pioneer VSX-S520
* = cable passed from Bedroom to Media Center  └─ Sony XR65A80K (Google TV)
Link to post
Share on other sites

A lot of users, including myself have moved onto using NextDNS from Pi Hole (https://nextdns.io/). Yes, it costs $20 a year, but is way simpler to setup, plays nicer on IOS, with the NextDNS client installed will even work when roaming with a mobile device/laptop outside your LAN. 

 

On my network I have setup to run on my router (Unifi Dream Machine Pro) to serve my entire network seamlessly, was dead simple to setup, just two commands, one to install and another to set it start up on startup: 

 

https://jmcglock.substack.com/p/how-to-install-nextdns-on-the-udm

 

Link to post
Share on other sites

  • 1 year later...
17 minutes ago, shawshawshaw said:

Hi LTT! I can not get rid of YouTube ads. Is it currently possible with PiHole, or will I have to use uBlock? uBlock gets rid of them on my computer, but I can't install it on Roku.

PiHole will do nothing against youtube ads. DNS based adblockers will not work against youtube since they serve the ads and the videos themselves from the same servers. 

I sell teeth and teeth accessories 🦷

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×