-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
165 lines (153 loc) · 3.73 KB
/
docker-compose.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
networks:
internal:
ipam:
driver: default
config:
- subnet: "10.53.0.0/24"
volumes:
dnscollector:
prometheus:
services:
unbound:
image: unbound
pull_policy: never
networks:
internal:
ipv4_address: 10.53.0.10
ports:
- "53:53/udp"
- "53:53/tcp"
- "443:443/tcp"
- "853:853/tcp"
build:
context: unbound
dockerfile: Dockerfile
configs:
- source: unbound-dnstap.conf
target: /etc/unbound/conf.d/dnstap.conf
- source: unbound-access.conf
target: /etc/unbound/local.d/access.conf
bind9:
image: bind9
pull_policy: never
networks:
internal:
ipv4_address: 10.53.0.10
ports:
- "53:53/udp"
- "53:53/tcp"
- "443:443/tcp"
- "853:853/tcp"
build:
context: bind9
dockerfile: Dockerfile
configs:
- source: bind9-dnstap.conf
target: /etc/named/local.d/dnstap.conf
- source: bind9-socat.sh
target: /etc/named/startup-hook.sh
exabgp:
image: exabgp
pull_policy: never
networks:
internal:
ipv4_address: 10.53.0.2
build:
context: exabgp
dockerfile: Dockerfile
dnscollector:
image: dmachard/go-dnscollector
networks:
internal:
ipv4_address: 10.53.0.11
environment:
- "TZ=Europe/Stockholm"
volumes:
- dnscollector:/var/dnscollector/
ports:
- "6000:6000/tcp"
- "8080:8080/tcp"
- "8081:8081/tcp"
configs:
- source: dnscollector.yaml
target: /etc/dnscollector/config.yml
prometheus:
# http://127.0.0.1:9090
image: prom/prometheus:latest
networks:
internal:
ipv4_address: 10.53.0.12
volumes:
- prometheus:/prometheus
ports:
- "9090:9090"
configs:
- source: prometheus.yaml
target: /etc/prometheus/prometheus.yml
configs:
unbound-dnstap.conf:
content: |
dnstap:
dnstap-enable: yes
dnstap-ip: 10.53.0.11@6000
dnstap-tls: no
dnstap-log-client-query-messages: yes
dnstap-log-client-response-messages: yes
dnstap-send-identity: yes
dnstap-send-version: yes
unbound-access.conf:
content: |
access-control: 0.0.0.0/0 allow
access-control: ::/0 allow
bind9-dnstap.conf:
content: |
dnstap-output unix "/var/run/named-dnstap.sock";
dnstap { auth; client response; resolver query; };
bind9-socat.sh:
content: |
socat -ls -v UNIX-LISTEN:/var/run/named-dnstap.sock,mode=777,reuseaddr,fork TCP4-CONNECT:10.53.0.11:6000 &
dnscollector.yaml:
content: |
global:
trace:
verbose: true
log-malformed: true
multiplexer:
collectors:
- name: tap
dnstap:
listen-ip: 0.0.0.0
listen-port: 6000
transforms:
normalize:
qname-lowercase: true
add-tld: true
suspicious:
enable: true
loggers:
- name: console
stdout:
mode: text
- name: json
logfile:
file-path: /var/dnscollector/dnstap.log
mode: text
- name: api
restapi:
listen-ip: 0.0.0.0
listen-port: 8080
- name: prom
prometheus:
listen-ip: 0.0.0.0
listen-port: 8081
basic-auth-enable: false
routes:
- from: [ tap ]
to: [ console, json, api, prom ]
prometheus.yaml:
content: |
scrape_configs:
- job_name: 'dnscollector'
scrape_interval: 10s
static_configs:
- targets: ['dnscollector:8081']