IPs:

  • root: 10.0.0.10
  • tld: 10.0.0.20
  • auth: 10.0.0.30
  • resolver: 10.0.0.1

docker-compose.yml

name: dns-auth

services:
   dns-auth:
      image: ubuntu/bind9
      container_name: dns-auth
      volumes:
         - ./config:/etc/bind
      network_mode: "host"

</shx>

named.conf:

<sxh>
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";

Auth:

zone "miweb.smr" {
   type master;
   file "/etc/bind/zones/db.miweb.smr";
};

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

   recursion no;
   allow-query { any; };

   listen-on { 127.0.0.1; 10.0.0.30; };
   dnssec-validation no;
};

                                                                              
$TTL 86400
@   IN  SOA ns.miweb.smr. admin.miweb.smr. (
            2023101001
            3H
            15M
            1W
            1D )

@   IN  NS  ns.miweb.smr.
ns  IN  A   10.0.0.30
@   IN  A   <<ip_apache>>
www IN  A   <<ip_apache>>

TLD:

                                                                              
zone "smr" {
   type master;
   file "/etc/bind/zones/db.smr";
};

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

   recursion no;
   allow-query { any; };

   listen-on { 127.0.0.1; 10.0.0.20; };
   dnssec-validation no;
};

                                                                              
$TTL 86400
@   IN  SOA ns.tld.smr. admin.tld.smr. (
        2023101001
        3H
        15M
        1W
        1D )

@   IN  NS  ns.tld.smr.
ns.tld.smr.  IN  A   10.0.0.20

miweb.smr.      IN  NS  ns.miweb.smr.
ns.miweb.smr.   IN  A   10.0.0.30

ROOT:

                                                                         
zone "." {
   type master;
   file "/etc/bind/zones/db.root";
   notify no;
};

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

   recursion no;
   allow-query { any; };

   listen-on { 127.0.0.1; 10.0.0.10; };
   dnssec-validation no;
};

                                                                              
TTL 86400
@   IN  SOA ns.root. admin.root. (
        2023101001
        3H
        15M
        1W
        1D )

@   IN  NS  ns.
ns.  IN  A   10.0.0.10

; DELEGACIÓN DEL TLD .smr
smr.        IN  NS  ns.tld.smr.
ns.tld.smr. IN  A   10.0.0.20

RESOLVER:

                                                                         
zone "." {
   type hint;
   file "/etc/bind/zones/db.hints";
};

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

   recursion yes;
   allow-recursion { any; };

   listen-on { 127.0.0.1; 10.0.0.1; };
   dnssec-validation no;
};

                                                                              
$TTL 3600000
.                        IN  NS  ns.
ns.                 IN  A   10.0.0.10

  • clase/smr/sr/dns.txt
  • Última modificación: 2026/01/28 10:44
  • por cesguiro