Add local DNS resolver and ratelimit to open to UDP
This commit is contained in:
parent
533a005e94
commit
3bab0427fe
|
@ -4,5 +4,6 @@ RUN apk add --no-cache --update unbound ca-certificates
|
||||||
COPY certs/ /usr/local/share/ca-certificates/
|
COPY certs/ /usr/local/share/ca-certificates/
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
ADD unbound.conf /etc/unbound/unbound.conf
|
ADD unbound.conf /etc/unbound/unbound.conf
|
||||||
|
ADD redxen-dns.conf /etc/unbound/redxen-dns.conf
|
||||||
ENTRYPOINT ["unbound", "-c", "/etc/unbound/unbound.conf"]
|
ENTRYPOINT ["unbound", "-c", "/etc/unbound/unbound.conf"]
|
||||||
EXPOSE 5353/udp 5353/tcp
|
EXPOSE 5353/udp 5353/tcp
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
server:
|
||||||
|
local-zone: "redxen.eu." static
|
||||||
|
local-data: "redxen.eu. 10800 IN NS ns1.redxen.eu"
|
||||||
|
local-data: "redxen.eu. 10800 IN NS ns2.redxen.eu"
|
||||||
|
local-data: "redxen.eu. 10800 IN NS ns3.redxen.eu"
|
||||||
|
local-data: "redxen.eu. 10800 IN NS ns4.redxen.eu"
|
||||||
|
local-data: "redxen.eu. 10800 IN NS ns5.redxen.eu"
|
||||||
|
|
||||||
|
local-data: "redxen.eu. A 88.198.95.52"
|
||||||
|
local-data: "stats.redxen.eu. A 88.198.95.52"
|
||||||
|
local-data: "git.redxen.eu. A 88.198.95.52"
|
||||||
|
local-data: "seed.redxen.eu. A 88.198.95.52"
|
||||||
|
local-data: "sd.redxen.eu. A 88.198.95.52"
|
||||||
|
local-data: "ns1.redxen.eu. A 88.198.95.52"
|
||||||
|
|
||||||
|
local-data: "redxen.eu. A 88.198.95.107"
|
||||||
|
local-data: "stats.redxen.eu. A 88.198.95.107"
|
||||||
|
local-data: "git.redxen.eu. A 88.198.95.107"
|
||||||
|
local-data: "seed.redxen.eu. A 88.198.95.107"
|
||||||
|
local-data: "sd.redxen.eu. A 88.198.95.107"
|
||||||
|
local-data: "ns2.redxen.eu. A 88.198.95.107"
|
||||||
|
|
||||||
|
local-data: "redxen.eu. A 88.198.95.106"
|
||||||
|
local-data: "stats.redxen.eu. A 88.198.95.106"
|
||||||
|
local-data: "git.redxen.eu. A 88.198.95.106"
|
||||||
|
local-data: "seed.redxen.eu. A 88.198.95.106"
|
||||||
|
local-data: "sd.redxen.eu. A 88.198.95.106"
|
||||||
|
local-data: "ns3.redxen.eu. A 88.198.95.106"
|
||||||
|
|
||||||
|
local-data: "redxen.eu. A 88.198.95.100"
|
||||||
|
local-data: "stats.redxen.eu. A 88.198.95.100"
|
||||||
|
local-data: "git.redxen.eu. A 88.198.95.100"
|
||||||
|
local-data: "seed.redxen.eu. A 88.198.95.100"
|
||||||
|
local-data: "sd.redxen.eu. A 88.198.95.100"
|
||||||
|
local-data: "ns4.redxen.eu. A 88.198.95.100"
|
||||||
|
|
||||||
|
local-data: "redxen.eu. A 88.198.95.63"
|
||||||
|
local-data: "stats.redxen.eu. A 88.198.95.63"
|
||||||
|
local-data: "git.redxen.eu. A 88.198.95.63"
|
||||||
|
local-data: "seed.redxen.eu. A 88.198.95.63"
|
||||||
|
local-data: "sd.redxen.eu. A 88.198.95.63"
|
||||||
|
local-data: "ns5.redxen.eu. A 88.198.95.63"
|
|
@ -1,14 +1,15 @@
|
||||||
|
include: "/etc/unbound/redxen-dns.conf"
|
||||||
server:
|
server:
|
||||||
directory: "/etc/unbound"
|
directory: "/etc/unbound"
|
||||||
username: unbound
|
username: unbound
|
||||||
interface: 0.0.0.0
|
interface: 0.0.0.0
|
||||||
interface: ::0
|
interface: ::0
|
||||||
do-udp: no
|
|
||||||
access-control: 0.0.0.0/0 allow
|
access-control: 0.0.0.0/0 allow
|
||||||
root-hints: root.hints
|
root-hints: root.hints
|
||||||
trust-anchor-file: /usr/share/dnssec-root/trusted-key.key
|
trust-anchor-file: /usr/share/dnssec-root/trusted-key.key
|
||||||
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
|
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt
|
||||||
port: 5353
|
port: 5353
|
||||||
|
ratelimit: 20
|
||||||
prefetch: yes
|
prefetch: yes
|
||||||
prefetch-key: yes
|
prefetch-key: yes
|
||||||
do-daemonize: no
|
do-daemonize: no
|
||||||
|
|
2
dns.yml
2
dns.yml
|
@ -30,6 +30,6 @@ services:
|
||||||
- "/etc/hosts:/etc/hosts:ro"
|
- "/etc/hosts:/etc/hosts:ro"
|
||||||
ports:
|
ports:
|
||||||
- "53:5353/tcp"
|
- "53:5353/tcp"
|
||||||
- "53:5353/udp" # LOCAL NETWORK ONLY, see https://www.us-cert.gov/ncas/alerts/TA14-017A
|
- "53:5353/udp" # Potentially vulnerable without any ratelimits, see https://www.us-cert.gov/ncas/alerts/TA14-017A
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
Reference in New Issue