Commit graph

1250 commits

Author SHA1 Message Date
rsclarke
ead84e1fa8
plugin/acl: adding ability to drop queries (#5722)
Both block and filter actions write responses to the client based upon
the source IP address of the UDP packet containing the query.  An
attacker spoofing the source IP address to that of their target, can
elicit a response to be sent to the victim host, known as DNS
Reflection.  If an attacker is able to elicit a large response from a
relatively small query, with a spoofed source IP address, they are able
to increase the amount of data sent to the victim, known as DNS
Amplification.  Scaling this from one to many queries allows an attacker
to perform an effective Denial of Service (DoS) attack against their
target.

Adding the drop action enables CoreDNS to ignore queries of a given
type or network range from being processed and a response written,
where an operator knows ahead of time, should not originate or be
destined to.

Signed-off-by: rsclarke <hey@rsclarke.dev>

Signed-off-by: rsclarke <hey@rsclarke.dev>
2022-11-01 10:16:55 +01:00
Grant Spence
403e979934
plugin/cache: cache now uses source query DNSSEC option for upstream refresh (#5671)
Signed-off-by: Grant Spence <gspence@redhat.com>

Signed-off-by: Grant Spence <gspence@redhat.com>
2022-10-21 11:29:04 -04:00
Miciah Dashiel Butler Masters
6cb5e10707
plugin/k8s_external: Fix rcode for headless services (#5657)
Signed-off-by: Miciah Masters <miciah.masters@gmail.com>

Signed-off-by: Miciah Masters <miciah.masters@gmail.com>
2022-10-20 16:30:12 -04:00
Yong Tang
c6a543551e
plugin/file: fix file leak (#5687) 2022-10-11 20:49:52 +02:00
Yong Tang
26aae951e7
plugin/forward: fix ticker leak in golang (#5689) 2022-10-11 15:28:24 +02:00
Yong Tang
006703c1b2
plugin/auto: fix ticker leak in golang (#5688) 2022-10-11 15:27:20 +02:00
Yong Tang
c61e8f3dbc
plugin/hosts: fix ticker leak in golang (#5690) 2022-10-11 15:26:45 +02:00
Ondřej Benkovský
4ae811ad96
plugin/reload : stop scheduler on shutdown (#5686) 2022-10-11 07:05:00 -04:00
Ondřej Benkovský
2fa9821c7e
plugin/template : add support for extended DNS errors (#5659)
* plugin/template : add support for extended DNS errors

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-10-03 11:04:56 -04:00
Ondřej Benkovský
d436deb93b
plugin/view : fix README (#5627)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-09-17 09:59:47 -04:00
Erik Johansson
0032be6a56
plugin/template: fix formatting with go fmt (#5622)
Signed-off-by: Erik Johansson <ejohansson@spotify.com>

Signed-off-by: Erik Johansson <ejohansson@spotify.com>
2022-09-15 15:48:38 -04:00
Erik Johansson
e93e932ce8
plugin/template: Add parseInt template function (#5609)
* plugin/template: Add parseInt template function

Signed-off-by: Erik Johansson <ejohansson@spotify.com>
2022-09-15 15:25:58 -04:00
Ondřej Benkovský
51f021c079
plugin/template : add view label into plugin metrics (#5620)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-09-15 09:36:49 -04:00
Ondřej Benkovský
4116a4ebdb
plugin/prometheuss : make plugin enabled metric view aware (#5618)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-09-14 14:45:45 -04:00
Ondřej Benkovský
dc84196690
plugin/acl : add view label into metrics (#5615)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-09-12 16:35:59 -04:00
coredns[bot]
630fa4786a auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2022-09-12 10:30:25 +00:00
Chris O'Haver
b56b080a7c
plugin/view: Advanced routing interface and new 'view' plugin (#5538)
* introduce new interface "dnsserver.Viewer", that allows a plugin implementing it to decide if a query should be routed into its server block.
* add new plugin "view", that uses the new interface to enable a user to define expression based conditions that must be met for a query to be routed to its server block.

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-09-08 14:56:27 -04:00
Chris O'Haver
8737ad49b3
plugin/tsig: Document unimplemented secondary tsig transfers (#5605)
document unimplemented secondary tsig; clarify plugin description
2022-09-07 11:39:31 -04:00
Chris Narkiewicz
07159c8d87
Do not expand query UDP buffer size if already set to a smaller value (#5602)
Signed-off-by: Krzysztof Narkiewicz <knarkiewicz@bloomberg.net>

Signed-off-by: Krzysztof Narkiewicz <knarkiewicz@bloomberg.net>
Co-authored-by: Krzysztof Narkiewicz <knarkiewicz@bloomberg.net>
2022-09-07 22:53:30 +09:00
Daniel Jolly
0511ca2e4d
Identity and version support for the dnstap plugin (#5555)
* Added identity and version support to dnstap plugin

Signed-off-by: Daniel Jolly <code@danieljolly.com>

* Added missing commas

Signed-off-by: Daniel Jolly <code@danieljolly.com>

* Moved byte slice conversions to setup rather than handler.
Fixed indentation issue.

Signed-off-by: Daniel Jolly <code@danieljolly.com>

* Improved setup config parsing and added tests to detect various configurations

Signed-off-by: Daniel Jolly <code@danieljolly.com>

Signed-off-by: Daniel Jolly <code@danieljolly.com>
Co-authored-by: Daniel Jolly <code@danieljolly.com>
2022-09-07 06:22:38 -07:00
coredns[bot]
2fcc74b94e auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2022-09-05 10:29:36 +00:00
TomasKohout
6782b7fb42
plugin/k8s_external: Resolve headless services (#5505)
*add option for resolving headless Services without external IPs in k8s_external

Signed-off-by: Tomas Kohout <tomas.kohout1995@gmail.com>
2022-08-30 14:59:27 -04:00
Abirdcfly
b218b56063
chore: remove duplicate word in comments (#5592)
* chore: remove duplicate word in comments

Signed-off-by: Abirdcfly <fp544037857@gmail.com>

* auto go mod tidy

Signed-off-by: coredns[bot] <bot@bot.coredns.io>

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
Co-authored-by: coredns[bot] <bot@bot.coredns.io>
2022-08-30 16:35:31 +02:00
AndreasHuber-CH
b55cee4d1a
plugin/rewrite: Allow configuring min and max TTL values when rewriting TTL (#5508) 2022-08-17 15:33:51 -04:00
Vancl
4033d7aeba
plugin/forward: health_check needs to normalize a specified domain name (#5543)
* plugin/forward: convert the specified domain of health_check to Fqdn
* plugin/forward: update readme for health check

Signed-off-by: vanceli <vanceli@tencent.com>
2022-08-15 10:16:15 -04:00
Alex
c9e9954d33
Add PTR records to supported types (#5565)
* Add PTR records to supported types

Signed-off-by: Alex Bulatov <xbulat@gmail.com>

* Add extra line

Signed-off-by: Alex Bulatov <xbulat@gmail.com>

* Fix title

Signed-off-by: Alex Bulatov <xbulat@gmail.com>

Signed-off-by: Alex Bulatov <xbulat@gmail.com>
2022-08-14 10:26:39 -04:00
Christoph Heer
5c1447e0b0
plugin/header: Add support for query modification (#5548) (#5556) 2022-08-12 04:46:06 -07:00
Chris O'Haver
0188090ae9
add CNAME example to README (#5537)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-08-03 13:51:49 +03:00
Chris O'Haver
95fcf2c480
plugin/cache: Add cache disable option (#5540)
* add cache disable options

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-28 10:51:08 -04:00
Ondřej Benkovský
2fe5273cd1
plugin/acl : add support for Extended DNS Errors (#5532)
* plugin/acl : add support for Extended DNS Errors

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>

* fixup! plugin/acl : add support for Extended DNS Errors

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-07-25 07:44:13 -07:00
Abirdcfly
1cb294dbf9
remove redundant continue in test (#5529)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-21 08:38:38 -04:00
Chris O'Haver
513f27b9a9
plugin/forward: Enable multiple forward declarations (#5127)
* enable multiple declarations of forward plugin

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-20 10:35:04 -04:00
Chris O'Haver
11059dd855
remove trailing empty lines per linter (#5526)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-19 15:26:17 -04:00
Shane Xie
edbe02c0f9
core: add log listeners for k8s_event plugin (#5451)
add log listener interface

Signed-off-by: xh4n3 <xyn1016@gmail.com>
2022-07-18 09:52:06 -04:00
Chris O'Haver
29f3dcfa10
plugin/ready: Reset list of readiness plugins on startup (#5492)
* reset readiness plugins list on startup

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-18 09:50:15 -04:00
coredns[bot]
0e4ca22f44 auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2022-07-11 10:31:48 +00:00
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
Ondřej Benkovský
abc5ac8017
plugin/trace : make zipkin HTTP reporter more configurable using Corefile (#5460)
* plugin/trace : make zipkin HTTP reporter more configurable using Corefile

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-07-08 07:20:19 -04:00
Chris O'Haver
83adb8fa22
plugin/file/cache: Add metadata for wildcard record responses (#5308)
For responses synthesized by known wildcard records, publish metadata containing the wildcard record name

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-07 17:07:04 -04:00
Chris O'Haver
e80d696502
plugin/k8s_external: Add support for PTR requests (#5435)
* Exclude External IP addresses from being added to the existing kubernetes' plugin IP->Service index
* Add support for PTR requests on External IPs of Services to the k8s_external plugin

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-06 13:55:15 -04:00
Chris O'Haver
d903a963ee
dont lameduck when reloading (#5472)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-06 13:52:18 -04:00
Chris O'Haver
c4d02442ef
add tsig to codeowners; update chaos authors (#5479)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-01 10:06:30 -07:00
coredns[bot]
390e88637e auto remove trailing whitespaces
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2022-06-28 10:30:12 +00:00
Chris O'Haver
68e141eff2
plugin/tsig: new plugin TSIG (#4957)
* expose tsig secrets via dnsserver.Config
* add tsig plugin

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-06-27 15:48:34 -04:00
Yong Tang
0218a34008
Fix out-of-index issue in rewrite plugin (#5462)
This PR fixes another out-of-index issue in rewrite to avoid
security vuln.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-06-26 16:06:43 -07:00
Ondřej Benkovský
e0dead4aa2
plugin/kubernetes : make kubernetes client log in CoreDNS format (#5461)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-06-26 14:49:45 -07:00
Yong Tang
4a40e9e3a0
Fix a crash in rewrite plugin when rule type is missing (#5459) 2022-06-25 09:17:35 -07:00
Ondřej Benkovský
501e50312e
plugin/trace: make zipkin and datadog reporters log errors using CoreDNS logger (#5452) 2022-06-23 03:40:13 -07:00
Ondřej Benkovský
af4d84d915
plugin/trace: read trace context info from headers for DOH (#5439)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-06-20 07:08:53 -07:00
Chris O'Haver
037e4920c2
plugin/health: Bypass proxy in self health check (#5401)
* add detail to docs; bypass proxy in self health check

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-06-17 15:49:53 -04:00