Hi all,
I'm brand new to the Pi-hole scene, so apologies if this is a dumb set of questions!
I'm looking to block requests to a good amount of the TLDs out there (see http://data.iana.org/TLD/tlds-alpha-by-domain.txt for the authoritative list). I wrote a script to parse out the top 100-200 that I'd still like to query, and so I'm left with about ~1300 TLDs to block all wildcard/subdomain requests for.
A few questions here:
- Can this be done with a block list? It seemed that block lists (e.g., the default ones) call out the exact domain in question to block (and do not allow for a wild card), but my understanding about blocklists vs. blacklists may be very incorrect here.
- If this needs to be done with a script that interacts with Pi-hole - what is the best way to do that? Should I iterate over the file one line at a time, and just call
pihole -wild TLD1
,pihole -wild TLD2
,pihole -wild TLD3
, etc, which may take a while? Or does Pi-hole's ability to support multiple domains at once allow a user to specify a ridiculously large number of them? (e.g.,pihole -wild TLD1 TLD2 TLD3 ... TLD1299 TLD1300
) - Alternatively, assuming that I need to use a script, is putting an arbitrary file in /etc/dnsmasq.d (per https://discourse.pi-hole.net/t/how-do-i-add-wildcard-sites-to-the-blacklist/337) with the TLDs formatted in the right format a better solution, or is that frowned upon?
My goal is to be able to re-apply my entire "bad" TLD list on a weekly basis, but wanted to know what the recommended path is for doing so from a developer perspective.
Thanks,
Andras