Social media DNS Blocklists for Pihole/AdGuard
Now includes a script (create_hosts.py) to convert host files to both Pihole and Adguard formats.
- Login into
Pi-hole admin
- Navigate to
Settings
- Expand
Pi-Hole's Block Lists
- Copy this URL:
https://raw.githubusercontent.com/StevenLares/Block_facebook_dns/master/pihole-facebook.txt
- Paste the URL in the Edit box and click on
Save and update
- Login into
AdGuard
- Navigate to
Filters
- Click
Add filter
- Enter name
- Copy this URL:
https://raw.githubusercontent.com/StevenLares/Social-media-Blocklists/master/adguard-facebook.txt
- Paste the URL in the Edit box and click on
Add filter
https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#example-blocking-by-domain-name
You're done.
Follow the same steps (and adjust the URL) to block other social media networks.
- Add host files into the 'input' folder.
- Refer to the provided input files for valid formatting examples.
- The input files may have comments and empty lines.
- Run 'python3 create_hosts.py' in a terminal.
- The new host files can now be found in the 'output' folder.
The input files are not deleted after running the python script.
The requirements.txt file is not included, since only the standard Python library is used.