Allow recursion in dns server

This commit is contained in:
Pierre HUBERT 2024-09-27 07:03:25 +02:00
parent 00138d1ed0
commit a60609600f
3 changed files with 35 additions and 1 deletions

View File

@ -11,7 +11,8 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN sed 's/include "\/etc\/bind\/named.conf.default-zones";//g' /etc/bind/named.conf RUN sed 's/include "\/etc\/bind\/named.conf.default-zones";//g' /etc/bind/named.conf
RUN echo "include \"/etc/dns/master.conf\";" > /etc/bind/named.conf.local COPY named.conf.local /etc/bind/named.conf.local
COPY named.conf.options /etc/bind/named.conf.options
COPY start.sh /start.sh COPY start.sh /start.sh
COPY restart-bind /usr/bin COPY restart-bind /usr/bin

1
dns/named.conf.local Normal file
View File

@ -0,0 +1 @@
include "/etc/dns/master.conf";

32
dns/named.conf.options Normal file
View File

@ -0,0 +1,32 @@
acl "everybody" {
0.0.0.0/0;
};
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
//====================================================================== ==
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//====================================================================== ==
dnssec-validation auto;
listen-on-v6 { any; };
recursion yes;
allow-recursion { everybody; };
allow-transfer { none; };
};