Skip to content

Commit 2943c14

Browse files
committed
Add responsefilter external plugin
responsefilter is a CoreDNS plugin that filters DNS responses based on FQDN and IP CIDR blocklists to protect against DNS spoofing and malicious responses. Repository: https://github.com/isovalent/responsefilter
1 parent a1f732b commit 2943c14

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
+++
2+
title = "responsefilter"
3+
description = "*responsefilter* filters DNS responses based on FQDN and IP CIDR blocklists to protect against DNS spoofing."
4+
weight = 10
5+
tags = ["plugin", "responsefilter"]
6+
categories = ["plugin", "external"]
7+
date = "2026-01-22T17:00:00+01:00"
8+
repo = "https://github.com/isovalent/responsefilter"
9+
home = "https://github.com/isovalent/responsefilter"
10+
+++
11+
12+
## Description
13+
14+
The *responsefilter* plugin inspects DNS responses from upstream servers and blocks responses where the returned IP address matches a configured blocklist for specific domains. When a blocked response is detected, CoreDNS returns a REFUSED status instead of the spoofed IP address.
15+
16+
This plugin helps protect against DNS spoofing attacks and malicious DNS responses by allowing administrators to define which IP ranges are not acceptable for specific domains.
17+
18+
## Syntax
19+
20+
```
21+
responsefilter {
22+
block DOMAIN CIDR [CIDR...]
23+
}
24+
```
25+
26+
* **DOMAIN** - the domain name to apply the filter to (supports subdomains)
27+
* **CIDR** - one or more IP CIDR ranges to block for this domain
28+
29+
**Important:** The responsefilter directive must be placed before the forward directive in your Corefile.
30+
31+
## Examples
32+
33+
Block specific IP ranges for a domain:
34+
35+
```
36+
.:53 {
37+
responsefilter {
38+
block abc.com 10.1.1.0/24
39+
}
40+
forward . 8.8.8.8
41+
}
42+
```
43+
44+
Block multiple CIDR ranges for multiple domains:
45+
46+
```
47+
.:53 {
48+
responsefilter {
49+
block abc.com 10.1.1.0/24 192.168.0.0/16
50+
block xyz.com 172.16.0.0/12
51+
}
52+
forward . 8.8.8.8
53+
}
54+
```

0 commit comments

Comments
 (0)