Voltar ao ranking

mmotti/pihole-regex

Python

Custom regex filter list for use with Pi-hole.

pi-holepi-hole-blocklistspi-hole-ftlhostsfileblockingregexfilteradblocking
Crescimento de estrelas
Estrelas
1.4k
Forks
165
Crescimento semanal
Issues
12
5001k
jun. de 2018fev. de 2021nov. de 2023jul. de 2026
ArtefatosPyPIpip install pihole-regex
README

Regex Filters for Pi-hole

This is a custom regex filter file for use with Pi-hole v4+ (FTLDNS).

The purpose of this list is to compliment your existing blocklists using powerful regular expressions that can cover a very broad range of domains. A single regular expression can block thousands of 'bad' domains, and can even accommodate for domains following specific patterns that may not even (yet) exist on standard blocklists.

There are also some optional regex filters separate to the main installer that can be added manually (if desired):

All commands will need to be entered via Terminal (PuTTY or your SSH client of choice) after logging in and Python 3.6+ is required.

Add to Pi-Hole

curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/install.py | sudo python3

Remove from Pi-Hole

curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/uninstall.py | sudo python3

False Positives

Due to the restrictive nature of these regexps, you may encounter a small number of false positives for domain names that are similar to ad-serving / tracking domains. I have created a whitelist file to populate with user reported false positives. Please note that this file is not currently referenced during installation and is intended to be used only if you experience issues or for reference purposes.

Keep regexps up-to-date with cron (optional)

The following instructions will create a cron job to run every monday at 02:30 (adjust the time to suit your needs):

  1. Edit the root user's crontab (sudo crontab -u root -e)

  2. Enter the following:

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
30 2 * * 1 /usr/bin/curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/install.py | /usr/bin/python3
  1. Save changes

Removing the manually created cron job

If this script is the only thing you've added to the root user's crontab, you can run:

sudo crontab -u root -r

Otherwise, run:

sudo crontab -u root -e and remove the three lines listed above in the install instructions.

Repositórios relacionados
pi-hole/pi-hole

A black hole for Internet advertisements

ShellOtherpi-holead-blocker
pi-hole.net
60k3.3k
hagezi/dns-blocklists

DNS-Blocklists: For a better internet - keep the internet clean!

TextGNU General Public License v3.0dnsads
24.6k755
pi-hole/docker-pi-hole

The official Pi-hole Docker image from pi-hole.net

ShellOtherpi-holedocker-container
pi-hole.net
11.4k1.2k
privacy-protection-tools/anti-AD

致力于成为中文区命中率最高的广告过滤列表,实现精确的广告屏蔽和隐私保护。anti-AD 现已支持 AdGuardHome,dnsmasq,Surge,Pi-Hole,Clash, mihomo,smartdns,sing-box 等网络组件。完全兼容常见的广告过滤工具所支持的各种广告过滤列表格式

MIT Licensednsmasqeasylist
anti-ad.net
10.6k789
IAmStoxe/wirehole

WireHole is a combination of WireGuard, Pi-hole, and Unbound in a docker-compose project with the intent of enabling users to quickly and easily create a personally managed full or split-tunnel WireGuard VPN with ad blocking capabilities thanks to Pi-hole, and DNS caching, additional privacy options, and upstream providers via Unbound.

piholewireguard
iamstoxe.com
5k344
anudeepND/whitelist

A simple tool to add commonly white listed domains to your Pi-Hole setup.

PythonPyPIMIT Licensepi-holead-blocker
4.4k288
jokob-sk/NetAlertX

Network intruder and presence detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.

JavaScriptnpmGNU General Public License v3.0dockernetwork-security
netalertx.com
3.7k223
yokoffing/NextDNS-Config

Setup guide for NextDNS, a DoH proxy with advanced capabilities

GNU General Public License v3.0dnssecurity
3.1k75
pucherot/Pi.Alert

WIFI / LAN intruder detector. Check the devices connected and alert you with unknown devices. It also warns of the disconnection of "always connected" devices

JavaScriptnpmGNU General Public License v3.0wifilan
2.7k172
kboghdady/youTube_ads_4_pi-hole

YouTube script to add the new Ads list for Pi-hole

Shellpiholepihole-blocklists
2.6k251
pi-hole/web

Pi-hole Dashboard for stats and more

JavaScriptnpmOtherpi-holedashboard
pi-hole.net
2.5k641
vmstan/gravity-sync

💫 The easy way to synchronize the DNS configuration of two Pi-hole 5.x instances.

ShellGNU General Public License v3.0pi-holeraspberry-pi
vmstan.com/gravity-sync/
2.3k132