如何使用 bind9 arpa 配置两个域

如何使用 bind9 arpa 配置两个域

如何使用 bind9 arpa reverse 配置两个域?

我有两个 IP 和两个域名 dinis.com tijuca.com

我可以更改第二个区域并将其命名为“10.168.192.in-addr.arpatijuca

或者有另一种方法来配置两个域

我重新启动了绑定并且没有错误

  zone "dinis.com" {
             type master;
             file "/etc/bind/db.dinis.com";
             allow-transfer { 192.168.10.9; };
        };


        zone "10.168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/db.192";
        allow-transfer { 192.168.10.10; };
        };



        zone "tijuca.com" {
             type master;
             file "/etc/bind/db.tijuca.com";
             allow-transfer { 192.168.10.10; };
        };


        zone "10.168.192.in-addr.arpatijuca" {
        type master;
        notify no;
        file "/etc/bind/dbtijuca.88";
        allow-transfer { 192.168.10.10; };
        };

答案1

假设您指向的是使用虚拟主机的服务器。(apache virtualhost)

/etc/bind/named.conf.local
zone "domain1.com"{
    type master;
    file "/etc/bind/db.domain1.com";
};

zone "domain2.org"{
    type master;
    file "/etc/bind/db.domain2.org";
};

zone "1.168.192.in-addr.arpa"{
    type master;
    notify no;
    file "/etc/bind/db.192";
};

/etc/bind/db.domain1.com
 ;
 ;   BIND data file for local loopback interface
 ;
$TTL    604800
@   IN  SOA domain1.com. root.domain1.com. (
         101220150  ; Serial
         604800     ; Refresh
          86400     ; Retry
        2419200     ; Expire
         604800 )   ; Negative Cache TTL
;
@   IN  NS  ns0.domain1.com.
@   IN  A   192.168.1.6
ns0 IN  A   192.168.1.6
dev IN  A   192.168.1.5
www IN  A   192.168.2.5
devcwi  IN  A   192.168.1.5
cwi IN  A   192.168.2.5

 /etc/bind/db.domain2.org => keep the all serials the same
;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA domain2.org. root.domain2.org. (
         101220150      ; Serial
         604800     ; Refresh
          86400     ; Retry
        2419200     ; Expire
         604800 )   ; Negative Cache TTL
;
@   IN  NS  ns0.domain2.org.
@   IN  A   192.168.1.6
ns0 IN  A   192.168.1.6
dev IN  A   192.168.1.5
www IN  A   192.168.2.5

/etc/bind/named.conf.options

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

     forwarders {
        8.8.8.8;
        8.8.4.4;        
     };

    dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};
/etc/bind/db.192
; BIND reverse data file for local loopback interface
;
$TTL    604800
@   IN  SOA domain1.com. root.domain1.com. (
         101220150  ; Serial
         604800     ; Refresh
          86400     ; Retry
        2419200     ; Expire
         604800 )   ; Negative Cache TTL
;
@   IN  NS  ns0.domain1.com.
1   IN  PTR ns0.domain1.com.
2   IN  PTR dev.domain1.com.
3   IN  PTR www.domain1.com.
4   IN  PTR devcwi.domain1.com.
5   IN  PTR cwi.domain1.com.

/etc/resolv.conf
domain domain1.com
search domain1.com 
nameserver 127.0.0.1

相关内容