# block **Repository Path**: mirrors_miekg/block ## Basic Information - **Project Name**: block - **Description**: Proof of concept CoreDNS plugin that implements a block list - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-04-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # block ## Name *block* - blocks domains by using pi-hole's block lists. ## Description The block plugin will block any domain that is on the block lists. The block lists are downloaded on startup or otherwise once a week. For a domain that is blocked we will return a NXDOMAIN response. THIS IS A PROOF OF CONCEPT. IT IS NOT PRODUCTION QUALITY. ## Syntax ~~~ txt block ~~~ ## Metrics If monitoring is enabled (via the *prometheus* directive) the following metric is exported: * `coredns_block_count_total{server}` - counter of total number of blocked domains. The `server` label indicates which server handled the request, see the *metrics* plugin for details. ## Examples Block all domain on the block list. ``` corefile . { forward . 9.9.9.9 block } ``` On startup the block lists are downloaded, and assuming `005.example.org` is on the list, it will be blocked, including any subdomains. ~~~ [INFO] plugin/block: Block lists updated: 226126 domains added [INFO] plugin/block: Blocked 005.example.org. [INFO] plugin/block: Blocked www.005.example.org. ~~~ ## Bugs *Block* currently requires a **working** resolver to fetch the downloads. This should be re-worked to use the proxy/forwarder (if defined).