Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slyfox1186/pihole-regex
Custom RegEx, Exact, and Adlist filters for Pi-hole's FTLDNS
https://github.com/slyfox1186/pihole-regex
ad ad-blocker ads blacklist blacklisting dns dns-server dnsmasq filters pi-hole pihole pihole-blocklists python python3 regex shell-script wget whitelisting
Last synced: about 1 month ago
JSON representation
Custom RegEx, Exact, and Adlist filters for Pi-hole's FTLDNS
- Host: GitHub
- URL: https://github.com/slyfox1186/pihole-regex
- Owner: slyfox1186
- License: mit
- Created: 2021-05-15T13:21:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-18T16:41:28.000Z (3 months ago)
- Last Synced: 2024-09-27T13:02:25.815Z (about 1 month ago)
- Topics: ad, ad-blocker, ads, blacklist, blacklisting, dns, dns-server, dnsmasq, filters, pi-hole, pihole, pihole-blocklists, python, python3, regex, shell-script, wget, whitelisting
- Language: Python
- Homepage:
- Size: 17.7 MB
- Stars: 65
- Watchers: 8
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Pi-hole® v5+ FTLDNS: Advanced Filter Collection
Maximize the efficiency of your Pi-hole setup with our extensive collection of Regular Expressions (RegEx) and Exact Match filters. Designed to block a broad range of domains effectively, our filters simplify your blocking strategy by minimizing the need for numerous individual entries. Additionally, this repository includes customizable Exact Match filters for precise domain blocking and tools to facilitate the easy management of Adlist Group entries.## Announcement: New Pi-hole Database Management Tool
We're excited to announce the addition of a new script to our Pi-hole toolset! The "pihole_admin.py" script is a powerful Python-based tool that provides advanced management capabilities for your Pi-hole database. Some of the key features include:- Optimize the Pi-hole database to reduce size and fragmentation
- Backup the Pi-hole database to a specified location
- Fetch comprehensive statistics about your Pi-hole setup
- Clean up old data from the query storage
- Add or remove domains from the whitelist and blacklist
- Update the gravity database
- Analyze top blocked and allowed domains
- Run custom SQL queries on the Pi-hole databases
- Check for Pi-hole updates
- Remove duplicate domains across all lists
- Find similar domains based on a specified similarity thresholdThis tool is designed to simplify the management of your Pi-hole and provide deeper insights into your network's activity. You can find the script in our GitHub repository at [link-to-script].
## Prerequisites
To use the "pihole_admin.py" script, you will need to install the following Python packages:- `argparse`
- `logging`
- `matplotlib`
- `requests`
- `sqlite3`
- `tabulate`
- `typing`
- `fuzzywuzzy`You can install these packages using pip:
```bash
pip install argparse logging matplotlib requests sqlite3 tabulate typing fuzzywuzzy
```Alternatively, you can install the packages using the following commands:
```bash
sudo apt-get update
sudo apt-get install -y python3 python3-pip
pip3 install argparse logging matplotlib requests sqlite3 tabulate typing fuzzywuzzy
```## Quick Links
- **[Pi-hole Official Website](https://pi-hole.net/)** - Your starting point for Pi-hole setup and comprehensive information.## Filter Lists Overview
Our expertly curated filter lists are tailored to bolster your Pi-hole's domain blocking capabilities. Each list is focused on eliminating specific types of unwanted content, offering a more refined and efficient filtering approach:| Script Name | Access Link |
|---------------------|-------------------------------------------------------------------------------------------------|
| Adlists | [View](https://raw.githubusercontent.com/slyfox1186/pihole-regex/main/domains/adlists.txt) |
| Exact Whitelist | [View](https://raw.githubusercontent.com/slyfox1186/pihole-regex/main/domains/exact-whitelist.sql) |
| Exact Blacklist | [View](https://raw.githubusercontent.com/slyfox1186/pihole-regex/main/domains/exact-blacklist.sql) |
| RegEx Whitelist | [View](https://raw.githubusercontent.com/slyfox1186/pihole-regex/main/domains/regex-whitelist.sql) |
| RegEx Blacklist | [View](https://raw.githubusercontent.com/slyfox1186/pihole-regex/main/domains/regex-blacklist.sql) |## Getting Started
### Compatibility
This collection is compatible with Pi-hole (FTLDNS) version 5 and newer.### Remote Management Tools
For managing your Pi-hole remotely, consider using one of the following SSH clients:- **[OpenSSH](https://www.openssh.com/)** - A secure shell for remote management.
- **[PuTTY](https://www.putty.org/)** - A popular SSH and telnet client for Windows.
- **[Termius](https://termius.com/)** - A versatile SSH client for Android, iOS, and Desktop.## Installation
Follow these steps to apply the advanced filter collection to your Pi-hole setup:### RegEx and Exact Lists
Download and execute the installation script for RegEx and Exact Match filters:```bash
curl -LSso pi.py https://pi.optimizethis.net
sudo python3 pi.py
```### Adlists
To apply the Adlists filters, download and run the corresponding script:```bash
curl -LSso adlist.py https://adlist.optimizethis.net
sudo python3 adlist.py
```