I am trying to setup a local DNS server in ubuntu using this tutorial.
https://blog.yarsalabs.com/bind9-dns-server-setup-in-docker/
this is my docker run command:
docker run -d -p 1153:53/tcp -p 1153:53/udp -p 127.0.0.1:953:953/tcp --rm --name=dns-master --net=labnet --ip=192.168.0.2
However, when I try to query the DNS server, it says communication error.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Dockerfile
#Base Bind9 ImageFROM internetsystemsconsortium/bind9:9.18RUN apt update \&& apt install -y \ bind9-doc \ bind9-dnsutils \ bind9-host \ libedit2 \ dnsutils \ geoip-bin \ mariadb-server \ net-tools# Copy configuration filesCOPY configuration/named.conf.options /etc/bind/COPY configuration/named.conf.local /etc/bind/COPY configuration/db.vishnu /etc/bind/zones/# Expose PortsEXPOSE 53/tcpEXPOSE 53/udpEXPOSE 953/tcp# Start the Name ServiceCMD ["/usr/sbin/named", "-g", "-c", "/etc/bind/named.conf", "-u", "bind"]
zone file:db.vishnu
$TTL 1d ; default expiration time (in seconds) of all RRs without their own TTL value@ IN SOA ns1.vishnu. root.vishnu. ( 3 ; Serial 1d ; Refresh 1h ; Retry 1w ; Expire 1h ) ; Negative Cache TTL; name servers - NS records IN NS ns1.vishnu.; name servers - A recordsns1.vishnu. IN A 192.168.0.1one.vishnu. IN A 192.168.1.1two.vishnu. IN A 192.168.1.2
named.conf.local
zone "vishnu" { type master; file "/etc/bind/zones/db.vishnu";
not sure, where am I missing. pointers please.