Isso pressupõe que você esteja apontando para um (s) servidor (es) que está (ão) utilizando hospedagem virtual. (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