Network-wide DNS blocking without extra hardware.
Go to file
Dan Church dc38b1a376
Remove unused variable
2023-07-11 12:55:25 -05:00
allowlists Add support for allowlists 2022-11-25 16:17:54 -06:00
dnsmasq.d Add suggested 'bogus-priv', 'domain-needed' options 2022-12-13 11:51:03 -06:00
lists Clear custom ad domains list 2022-12-14 10:22:20 -06:00
repos Fix AdroitAdorKhan-EnergizedProtection 2022-12-08 14:25:01 -06:00
repos-noupdates Fix AdroitAdorKhan-EnergizedProtection 2022-12-08 14:25:01 -06:00
.editorconfig Add README, CONTRIBUTING, LICENSE 2022-11-11 16:59:14 -06:00
.gitignore Update gitignore 2022-11-12 11:27:01 -06:00
.gitmodules Fix AdroitAdorKhan-EnergizedProtection 2022-12-08 14:25:01 -06:00
CHANGELOG.md Release v0.2.0 2023-06-19 13:45:06 -05:00
CONTRIBUTING.md Add README, CONTRIBUTING, LICENSE 2022-11-11 16:59:14 -06:00
LICENSE-commons-clause.md Add README, CONTRIBUTING, LICENSE 2022-11-11 16:59:14 -06:00
LICENSE.md Add README, CONTRIBUTING, LICENSE 2022-11-11 16:59:14 -06:00
README.md Fix markdown formatting 2022-11-12 10:27:52 -06:00
custom.list Initial commit 2022-11-11 16:47:36 -06:00
local.list Initial commit 2022-11-11 16:47:36 -06:00
make-block.pl Remove vim modelines 2023-07-11 12:51:51 -05:00
update.cfg.example Replace Slackware-specific dnsmasq restart 2022-11-12 12:01:03 -06:00
update.sh Remove unused variable 2023-07-11 12:55:25 -05:00

README.md

You Don't Need Pi-hole

Network-wide DNS blocking without extra hardware.

This project implements the ad-blocking functionality of a Pi-hole without needing any extra hardware.

A Pi-hole is a Raspberry Pi based "black hole" for Internet advertisements. It works by intercepting and answering DNS queries for a list of known advertisement servers.

This project instead uses dnsmasq running on an existing server to answer DNS queries.

How to Install

You'll need dnsmasq installed for this.

  1. Clone the project:
git clone --recursive https://codeberg.org/h3xx/you-dont-need-pihole.git /etc/you-dont-need-pihole
  1. Run update.sh to generate the blocklist.

  2. Update dnsmasq.d/01-you-dont-need-pihole.conf, replacing /etc/you-dont-need-pihole with wherever the root of this project is installed to.

  3. Add the configuration directory to dnsmasq.conf:

echo 'conf-dir=/etc/you-dont-need-pihole/dnsmasq.d' >> /etc/dnsmasq.conf

You can also copy or symlink dnsmasq.d/01-you-dont-need-pihole.conf if you need the config to live somewhere else.

  1. Restart the dnsmasq service.

  2. Make sure 53/udp is unfirewalled.

  3. Go into your router settings and change the IP addressed provied via DHCP to be your server's local IP address. See this thread for a walkthrough.

  4. Recommended: Configure your local machine to use the local dnsmasq daemon for client DNS queries, i.e. software running on the same server as dnsmasq. This is a good idea because it may save some network traffic depending on how your router works. Worst case scenario, it'll do nothing.

If your OS uses dhcpcd for network configuration, you can add this line to your /etc/dhcpcd.conf

static domain_name_servers=127.0.0.1

License

Copyright (C) 2021-2022 Dan Church.

License GPLv3: GNU GPL version 3.0 (https://www.gnu.org/licenses/gpl-3.0.html)

with Commons Clause 1.0 (https://commonsclause.com/).

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

You may NOT use this software for commercial purposes.