Rebuilding From Source
Rebuilding CoreDNS from source
Ah… so you wanted to add some plugins eh?
okay so the CoreDNS Docs provide some instruction on compilation.
Make sure to install the pre-requisites
1
| wget https://go.dev/dl/go1.19.linux-arm64.tar.gz
|
1
| git clone https://github.com/coredns/coredns
|
1
2
| cd coredns
vi pluigin.cfg
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| root@coredns-01:/usr/src/coredns# git diff plugin.cfg
diff --git a/plugin.cfg b/plugin.cfg
index 46a7df4c..4106ae8e 100644
--- a/plugin.cfg
+++ b/plugin.cfg
@@ -45,6 +45,10 @@ chaos:chaos
loadbalance:loadbalance
tsig:tsig
cache:cache
+git:github.com/miekg/coredns-git
+mdns:github.com/openshift/coredns-mdns
+netbox:github.com/oz123/coredns-netbox-plugin
+unbound:github.com/coredns/unbound
rewrite:rewrite
header:header
dnssec:dnssec
root@coredns-01:/usr/src/coredns#
|
This is KINDA anticlimactic, as the command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
| root@coredns-01:/usr/src/coredns# ./coredns -plugins
Server types:
dns
Caddyfile loaders:
flag
default
Other plugins:
dns.acl
dns.any
dns.auto
dns.autopath
dns.azure
dns.bind
dns.bufsize
dns.cache
dns.cancel
dns.chaos
dns.clouddns
dns.debug
dns.dns64
dns.dnssec
dns.dnstap
dns.erratic
dns.errors
dns.etcd
dns.file
dns.forward
dns.geoip
dns.git
dns.grpc
dns.header
dns.health
dns.hosts
dns.k8s_external
dns.kubernetes
dns.loadbalance
dns.local
dns.log
dns.loop
dns.mdns
dns.metadata
dns.minimal
dns.netbox
dns.nsid
dns.pprof
dns.prometheus
dns.ready
dns.reload
dns.rewrite
dns.root
dns.route53
dns.secondary
dns.sign
dns.template
dns.tls
dns.trace
dns.transfer
dns.tsig
dns.unbound
dns.whoami
on
|
So now that we’ve compiled coredns, we’re ready to start configuring!