Skip to content

spr-networks/coredns-block

Folders and files

NameName
Last commit message
Last commit date
Oct 22, 2024
Aug 20, 2021
Oct 11, 2023
Oct 22, 2024
Oct 21, 2024
Oct 15, 2024
Sep 13, 2024
Oct 17, 2024
Oct 9, 2024
Oct 7, 2024
Oct 7, 2024
Nov 23, 2023
Oct 15, 2024
Aug 20, 2021
Oct 22, 2024
Mar 6, 2024
Aug 20, 2021
Jan 23, 2025

Repository files navigation

block

This is an updated version of miekg's block plugin from https://github.com/miekg/block

  • Supports multiple lists
  • Integrated with SPR for applying blocklists by tag, provide API for managing lists.
  • Has support for per-client overrides and expiring entries

Name

block - blocks domains

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 -- can also be updated by configuration in the spr-api.

For a domain that is blocked we will return a NXDOMAIN response.

Syntax

block enable_superapi

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.

. {
  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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages