Many people use an ad blocker like uBlockOrigin to block ads from tracking us around the web but this only works on the devices it is installed on. We can do one better and prevent them all across any network in our control.
Method 1: Hosts file.
This method has the least overhead of the two and is great if you just want to get something up and running. Ideally, you would want a separate device to, but you can do this with any computer.
Every computer has a hosts file that holds data for converting domain names to their IP addresses. When you open one for the first time, it is pretty bare, and all requests get directed to your router for lookup.
- Log into the computer or device you want to use as your new DNS server. I am using a Raspberry Pi 2.
- Open Steven Black's Hosts Git Repo, scroll down, and find the file that works best for you. I am using the
Unified Hosts + Porn
. Click the link to the "Raw Hosts File," and you will see an enormous list of domains. - Open your hosts file
a. Linux & Mac OS X:/etc/hosts
b. Windows%SystemRoot%\system32\drivers\etc\hosts
- Copy and paste the raw text from step two into your hosts file. You can overwrite the file or create a symlink if you want. The file hosted on Github has all the bits required it the hosts file.
- Log into your home router.
- Find the IP address of the device you just added the hosts file too
- Copy this address and set is as your new DNS server for your router. (I can't walk you through this because they are all different.)
That's it! Now you have a network level ad blocker!
Thanks for this detailed description (tutorial) on how to set up a network adblocker. Privacy is almost nonexistent these days, we need all the help we can get to combat the information thieves! I have a Pi for running Kodi right now.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I totally agree! You should be able to run the Pi-Hole along side kodi but make sure to double check that to be sure.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Nice blog post! I use pihole too - I enjoyed your description and references. I will check out some of the lists you mentioned.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Very cool man! Feel free to message me on Matrix/Riot if you want to chat more about this kind of stuff.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit