[CentOS] Configuring BIND to answer to two domain names (four IP addresses)
James A. Peltier
jpeltier at sfu.ca
Fri Sep 24 20:06:12 UTC 2010
----- Original Message -----
| Thank you for all the help so far. To conclude:
| I have one physical server that answers to the following IP addresses:
| 1.1.1.1
| 1.1.1.2
| 1.1.1.3
| 1.1.1.4
|
| I need 1.1.1.1 & 1.1.1.2 to be the name servers for exampleA.com, and
| 1.1.1.3 & 1.1.1.4 to be the nameservers for exampleB.com. I have these
| files:
|
| # cat /etc/named.conf
|
| options {
| directory "/etc";
| pid-file "/var/run/named/named.pid";
| listen-on {
| any;
| };
| };
|
| zone "." {
| type hint;
| file "/etc/db.cache";
| };
|
| zone "exampleA.com" {
| type master;
| file "/var/named/exampleA.com.hosts";
| };
| zone "exampleB.com" {
| type master;
| file "/var/named/exampleB.com.hosts";
| };
|
|
|
| # cat /var/named/exampleA.com.hosts
|
| $ORIGIN exampleA.com.
| $TTL 1h
| exampleA.com. IN SOA ns1.exampleA.com. ns2.exampleA.com. (
| 1; Serial - increment me
| 10800
| 3600
| 604800
| 38400 )
| exampleA.com. IN NS ns1.exampleA.com.
| exampleA.com. IN NS ns2.exampleA.com.
| exampleA.com. IN A 1.1.1.1
| exampleA.com. IN A 1.1.1.2
formatting for NS records is incorrect. It should just read
NS ns1.exampleA.com
NS ns2.exampleA.com
where is your ns1.exampleA.com entry?
where is your ns2.exampleA.com entry?
| # cat /var/named/exampleB.com.hosts
|
| $ORIGIN exampleB.com.
| $TTL 1h
| exampleB.com. IN SOA ns1.exampleB.com. ns2.exampleB.com. (
| 1; Serial - increment me
| 10800
| 3600
| 604800
| 38400 )
| exampleB.com. IN NS ns1.exampleB.com.
| exampleB.com. IN NS ns2.exampleB.com.
| exampleB.com. IN A 1.1.1.3
| exampleB.com. IN A 1.1.1.4
NS records are same as above. Correct your formatting.
A records are not needed for NS records from a different zone, only for that zone
| How does that look?
Broken! :)
--
James A. Peltier
Systems Analyst (FASNet), VIVARIUM Technical Director
Simon Fraser University - Burnaby Campus
Phone : 778-782-6573
Fax : 778-782-3045
E-Mail : jpeltier at sfu.ca
Website : http://www.fas.sfu.ca | http://vivarium.cs.sfu.ca
MSN : subatomic_spam at hotmail.com
Does your OS has a man 8 lart?
http://www.xinu.nl/unix/humour/asr-manpages/lart.html
More information about the CentOS
mailing list