Created
April 21, 2025 16:28
-
-
Save ceroberoz/3943cf65459bb68741bdf3c6c3fc4d5b to your computer and use it in GitHub Desktop.
Pi-hole Whitelist for MAANG & Essential Services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# === Exact domains whitelist === | |
EXACT_WHITELIST=( | |
# --- Collaboration & Productivity --- | |
zoom.us | |
zoom.com | |
meet.google.com | |
docs.google.com | |
drive.google.com | |
googleusercontent.com | |
googledrive.com | |
gstatic.com | |
teams.microsoft.com | |
microsoftonline.com | |
skype.com | |
akamaized.net | |
# --- Streaming --- | |
netflix.com | |
nflximg.net | |
nflxso.net | |
disneyplus.com | |
hbomax.com | |
ytimg.com | |
# --- Device Services --- | |
samsungcloud.com | |
samsungknox.com | |
xiaomi.com | |
miui.com | |
api.micloud.xiaomi.net | |
# --- Communication --- | |
gmail.com | |
google.com | |
googleapis.com | |
whatsapp.com | |
web.whatsapp.com | |
whatsapp.net | |
telegram.org | |
web.telegram.org | |
t.me | |
# --- MAANG Additions --- | |
# Meta (Facebook/Instagram/WhatsApp already partially included) | |
facebook.com | |
fbcdn.net | |
instagram.com | |
cdninstagram.com | |
# Apple | |
apple.com | |
icloud.com | |
itunes.apple.com | |
apps.apple.com | |
mzstatic.com | |
# Amazon | |
amazon.com | |
amazonaws.com | |
a2z.com | |
primevideo.com | |
) | |
# === Regex domains whitelist === | |
REGEX_WHITELIST=( | |
'(^|\.)googlevideo\.com$' | |
'(^|\.)ytimg\.com$' | |
'(^|\.)nflximg\.net$' | |
'(^|\.)nflxso\.net$' | |
'(^|\.)akamaized\.net$' | |
'(^|\.)samsungcloud\.com$' | |
'(^|\.)samsungknox\.com$' | |
'(^|\.)microsoftonline\.com$' | |
'(^|\.)miui\.com$' | |
'(^|\.)xiaomi\.com$' | |
'(^|\.)googleusercontent\.com$' | |
'(^|\.)gstatic\.com$' | |
'(^|\.)googleapis\.com$' | |
'(^|\.)whatsapp\.com$' | |
'(^|\.)whatsapp\.net$' | |
'(^|\.)telegram\.org$' | |
'(^|\.)t\.me$' | |
# --- MAANG Regex Additions --- | |
'(^|\.)facebook\.com$' | |
'(^|\.)fbcdn\.net$' | |
'(^|\.)instagram\.com$' | |
'(^|\.)cdninstagram\.com$' | |
'(^|\.)apple\.com$' | |
'(^|\.)icloud\.com$' | |
'(^|\.)itunes\.apple\.com$' | |
'(^|\.)apps\.apple\.com$' | |
'(^|\.)mzstatic\.com$' | |
'(^|\.)amazon\.com$' | |
'(^|\.)amazonaws\.com$' | |
'(^|\.)a2z\.com$' | |
'(^|\.)primevideo\.com$' | |
) | |
echo "🔹 Adding Exact whitelist entries..." | |
for domain in "${EXACT_WHITELIST[@]}"; do | |
pihole allow "$domain" | |
done | |
echo "🔹 Adding Regex whitelist entries..." | |
for regex in "${REGEX_WHITELIST[@]}"; do | |
pihole --allow-regex "$regex" | |
done | |
echo "✅ Whitelist import complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment