bind: Can you configure multiple domains using the same nameserver
by Etcetera_77 from LinuxQuestions.org on (#4RHWH)
Can you add multiple domains to a nameserver without creating a new IP address? I have one IP address on my machine and have configured forward and reverse zone files. Names are resolving fine.
I know I can add another domain to the named.conf file and create new forward and reverse files. what name server IP would i add to the forward file for the second domain and how is it configured in the forward file? Also I have named my reverse file with the reverse of the first 3 octets of my system IP address. I need to change that and what should i use for the reverse zone names?
named.conf:
zone "myserver.com" {
type master;
file "fwd.myserver.com.db";
allow-update { none; };
};
zone "xx.xx.xxx.in-addr.arpa" {
type master;
file "xx.xx.xxx.db";
allow-update { none; };
};
zone "newdomain.com" {
type master;
file "fwd.newdomain.com.db";
allow-update { none; };
};
/var/named:
cat fwd.myserver.com.db
$TTL 86400
@ IN SOA nameserver.myserver.com. root.myserver.com. (
10030 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expiry
86400 ;Minimum TTL
)
; Name Server @ IN NS nameserver.myserver.com.
;A Record Definitions
nameserver IN A xxx.xx.xx.xx
server1 IN A xxx.xx.xx.xx
server2 IN A xxx.xx.xx.xx
How do I configure the forward zone record for the newdomain? i have used the one system IP address for the name server in the myserver.com domain.


I know I can add another domain to the named.conf file and create new forward and reverse files. what name server IP would i add to the forward file for the second domain and how is it configured in the forward file? Also I have named my reverse file with the reverse of the first 3 octets of my system IP address. I need to change that and what should i use for the reverse zone names?
named.conf:
zone "myserver.com" {
type master;
file "fwd.myserver.com.db";
allow-update { none; };
};
zone "xx.xx.xxx.in-addr.arpa" {
type master;
file "xx.xx.xxx.db";
allow-update { none; };
};
zone "newdomain.com" {
type master;
file "fwd.newdomain.com.db";
allow-update { none; };
};
/var/named:
cat fwd.myserver.com.db
$TTL 86400
@ IN SOA nameserver.myserver.com. root.myserver.com. (
10030 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expiry
86400 ;Minimum TTL
)
; Name Server @ IN NS nameserver.myserver.com.
;A Record Definitions
nameserver IN A xxx.xx.xx.xx
server1 IN A xxx.xx.xx.xx
server2 IN A xxx.xx.xx.xx
How do I configure the forward zone record for the newdomain? i have used the one system IP address for the name server in the myserver.com domain.