you can use the regex pattern (?i)vpn to block domains containing "vpn" in a case-insensitive manner. Here’s how to add it to Pi-hole:
-
Open the Pi-hole admin panel:
http://pi.hole/adminorhttp://<Your-Pi-hole-IP>/admin
-
Go to "Group Management" > "Domain Lists" > "Blacklist".
-
Click on the "Regular Expression" tab.
-
Add the following regex rule:
(?i)vpn -
Click "Add", then restart Pi-hole's DNS service:
pihole restartdns
If you prefer using the command line, SSH into your Pi-hole device and run:
pihole --regex '(?i)vpn'This will add the regex to block any domain containing "vpn" (case-insensitive).
You can check if a domain is blocked by running:
pihole -q vpnexample.comIf blocked, it will show up in the query logs.