DNS Hole is a network-level advertisement and Internet tracker blocking tool which acts as a DNS sinkhole. It comes with a tracker and advertisement block list that can be customized according to user preferences and requirements.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
DNS Hole requires Python (> Python 3.6) .
$ git clone https://github.com/gdsoumya/dns_hole.git
or
Download and extract the Zip-File
The Project has a few dependencies which can be installed by running.
$ pip install -r dependencies.txt
To start blocking ads and trackers run
$ python dns_hole.py
- Aggressive Mode : Aggressively blocks any link which contains the keyword "AD". Use with CAUTION, links like googleadservices.com as well as links like addition.com will be blocked.
Finally a DNS Server will be initialized at 0.0.0.0:53 for use.
Possible Errors :
- Run As Root : On linux based systems the script needs to be executed as root, on windows admin permissions will be requested.
- Port 53 is already in use/Socket Error : Other processes or services are using the required port(53), kill or close them before executing the script.
To use DNS Hole you can choose one of the following options:
- Setup DNS Hole on the Hotspot/Router.
- Set the DNS address in your router settings to point to the DNS Hole system.
- Setup network settings on specific devices to point their dns to the DNS Hole system.
To change/update the block list just add or remove the necessary urls in the BlockList.txt file.
- dnslib : A library to encode/decode DNS wire-format packets.
- Soumya Ghosh Dastidar
Any contribution/suggestions are welcomed.