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 !