0

I have set up a Bind9 container in order to allow my host machine to resolve "www.beesafe.co" as my apache server (which is running in another container with 172.19.0.4 IP address).

However, I cannot even resolve this address inside the Bind9 container itself using nslookup command. I think I have set my config files wrong.

Here are the four config files I copied inside the container (I followed a tutorial since I'm new to this).

named.conf.local :

zone "beesafe.co" {
 type master;
 file "/etc/bind/forward.beesafe.co";
};

zone "0.19.172.in-addr-arpa" {
 type master;
 file "/etc/bind/reverse.beesafe.co";
};

named.conf.options :

options {
 directory "/var/cache/bind";

 forwarders {
  8.8.8.8;
  9.9.9.9;
 };
 
 dnssec-validation auto;

 listen-on-v6 { any; };
};

forward.beesafe.co :

$TTL 20
@ IN SOA beesafe.co. root.beesafe.co. (
         2  ; Serial
         20 ; Refresh
         20 ; Retry
         20  ; Expire
         20 ) ; Negative Cache TTL
;
@ IN NS beesafe.co.
@ IN A 172.19.0.4
www IN A 172.19.0.4
#@ IN AAAA 1234:1234::1

reverse.beesafe.co :

$TTL 20
@ IN SOA beesafe.co. root.beesafe.co (
         1  ; Serial
        20  ; Refresh
        20  ; Retry
        20  ; Expire
        20 ) ; Negative Cache TTL
;
@ IN NS beesafe.co.
4 IN PTR beesafe.co.

And here is the command I use to launch my container :

sudo docker run --name bind9-dns-server --rm -it
-v /home/yael/Web_server/bind9-settings/forward.beesafe.co:/etc/bind/forward.beesafe.co
-v /home/yael/Web_server/bind9-settings/reverse.beesafe.co:/etc/bind/reverse.beesafe.co
-v /home/yael/Web_server/bind9-settings/named.conf.local:/etc/bind/named.conf.local
-v /home/yael/Web_server/bind9-settings/named.conf.options:/etc/bind/named.conf.options
ubuntu/bind9

I also tried to launch it with "--net host" attribute but it doesn't seem to help resolving this address on my host.

Could you help me find the problem here ?

Thank you a lot !

4
  • Have you checked any form of logs from Bind? Commented Feb 23, 2023 at 10:38
  • Here are the logs I get when lauching the bind container traff.co/I68ZJb2J Commented Feb 23, 2023 at 11:16
  • Right, it tells you the problem around lines 147-149. Commented Feb 23, 2023 at 11:53
  • Thanks to your comment I've been able to locate an "#" character in one of the config files. The logs seem clean now but I'm still unable to resolve this domain name inside nor outside the container Commented Feb 23, 2023 at 12:47

0

You must log in to answer this question.

Browse other questions tagged .