Skip to content

cparsell/Blocklists-Whitelists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blocklists-Whitelists

This is a reference repository for adblocking tools and settings (ads, tracking, etc). The text files are backups of filter lists I've uses in Pi-Hole, AdGuard, pfBlockerNG, and uBlock. So they are specific to to my setup - they may not work perfectly for you but they might be a place to start.

As a general rule, if you find a blocklist that has not been updated recently (within days or weeks) then it's probably not being maintained anymore. Move on to ones that are well maintained.

Whitelist

Whitelists tell the adblock what not to block. The whitelist I've included is what I've built up over time for myself.

In Pi-hole there is no way to import an entire whitelist. So I've included a very short Python script that automates this. It will run through a downloaded text file and push each line into Pi-hole's whitelist.

Other whitelists:

Hosts files (Pihole, Adguard Home, and PfBlockerNG compatible)

Every OS has a file called Hosts that it uses to map hostnames to IP addresses. Rewriting a hostname to 0.0.0.0 makes it inaccessible, blocking it. You can use these with DNS blockers like Pihole, Adguard Home, or PfBlockerNG.

Hosts file example

# Comment
0.0.0.0 www.pixel.ad
127.0.0.1 my.selfhosted.lan

Domain lists are simply text files with domains in them

# Comment
www.pixel.ad

Hosts files and domain lists

Browser-based Filtering (for web browser adblockers)

Filter lists are lists of patterns within webpages themselves. This allows things like blocking cookie messages, popups, or social media "like" buttons. Using a DNS blocker and a browser adblocker together works well. Brave Browser's built-in adblocker, AdGuard browser extension, and AdBlock Plus are ones I've used.

These are typical of these kind of filtering rule lists. These are not compatible with Pi-hole, PfBlockerNG, or AdGuard Home (DNS blockers):

Filter Examples

! Comment
.adnetwork.$domain=~adnetwork.ie|~adnetwork.sk
/ad_display.
/banners/ads/\*
/admanager/*$~object,domain=~admanager.line.biz|~blog.google|~sevio.com
###aniview--player
||netinsight.co.kr^$third-party
bleedingcool.com##.post_content_spacer

Browser Adblockers

Filter lists:

IP Block Lists (pfBlockerNG for pfSense)

These are lists of IP addresses. The firewall (pfSense) will refuse outbound or inbound connections to any IP adddresses in the list. One can use cybersecurity feeds as a preventative measure against trojans, botnet malware, and other garbage.

# Some are listed as singular IP addresses
1.117.3.64
1.12.254.218
1.12.60.59

# Some are listed as IP subnet masks
5.42.92.0/24

# Some are written as IP ranges
193.41.206.0	193.41.206.255	24	749	-	-	-
167.94.145.0	167.94.145.255	24	707	CENSYS-ARIN-02	US	None
194.169.175.0	194.169.175.255	24	706	AS-MATRIXTELECOM	GB	>>UNKNOWN<<

IP Blocklists:

Regex Filters

Some DNS blockers allow the use of regular expressions in order to describe patterns of hostnames. For example, /lgad.*/ will block lgad.foo.com as well as foo.lgad.bar.net.

It is a good idea to be minimal about how many regex filters you use. It takes longer for systems to process regex filters than to search through millions of domains. See this post for more a detailed explanation. I only try to use regex filters that are relevant to me.

Regex lists:

Tools:

Lists of lists

About

A list of lists I use for network hygiene

Topics

Resources

Stars

Watchers

Forks

Languages