I have a RH9 primary dns machine running apache and have installed SuSE on another machine which I am trying to configure as alternate dns (eventually I'll get around to installing a mail server). I have followed the guidelines on primary/secondary dns config at
http://www.yolinux.com/TUTORIALS/LinuxTutorialWebSiteConfig.html, but I have now lost the ability to resolve any URLs on the Internet from both Linux machines. Of course, dig
www.gmk-rep.com doesn't work, I get a SERVFAIL response, and the named.gmk-rep.com file does not copy from RH9 to the alternate dns server as advertised.
I have no errors on named startup in /var/log/messages, and if I use dig, or dig
www.gmk-rep.com@127.0.0.1,
I get no errors on RH9. Copying named.conf etc to this window would take some work since I am writing you from a Windows PC, but I'm fairly confident I followed the website instructions correctly, and these were:
Primary server (master):
File: /etc/named.conf
options {
version "Bind"; - Don't disclose real version to hackers
directory "/var/named";
allow-transfer { XXX.XXX.XXX.XXX; }; - IP address of secondary DNS
recursion no;
fetch-glue no; - Bind 8 only! Not used by version 9
};
zone "your-domain.com"{
type master;
file "named.your-domain.com";
notify yes;
};
zone "0.0.127.in-addr.arpa"{
type master;
file "named.local";
allow-update { none; };
};
Note the omission of zone "."
File: /var/named/named.your-doma
in.com
$TTL 604800 - Bind 9 (and some of the later versions of Bind 8) requires $TTL statement. Measured in seconds. This value is 7 days.
your-domain.com. IN SOA ns1.your-domain.com. hostmaster.your-domain.com
. (
2000021600 ; serial - Many people use year+month+day+integer as a system. Never greater than 2147483647 for a 32 bit processor.
86400 ; refresh - How often secondary servers should check in for changes in serial number. Measured in seconds. This value is equivalent to 24 hours.
7200 ; retry - How long secondary server should wait for a retry if contact failed.
1209600 ; expire - Secondary server to purge info after this length of time.
604800 ) ; default_ttl - How long data is held in cache by remote servers.
IN A XXX.XXX.XXX.XXX - Note that this is the default IP address of the domain. I put the web server IP address here so that domain.com points to the same servers as
www.domain.com;
; Name servers for the domain
;
IN NS ns1.your-domain.com.
IN NS ns2.your-domain.com.
;
; Mail server for domain
;
IN MX 5 mail - Identify "mail" as the node handling mail for the domain. Do NOT specify an IP address!
;
; Nodes in domain
;
node1 IN A XXX.XXX.XXX.XXX - Note that this is the IP address of node1
ns1 IN A XXX.XXX.XXX.XXX - Optional: For those hosting your own primary name server. Note that this is the IP address of ns1
ns2 IN A XXX.XXX.XXX.XXX - Optional: For those hosting your own secondary name server. Note that this is the IP address of ns2
mail IN A XXX.XXX.XXX.XXX - Identify the IP address for node mail.
IN MX 5 XXX.XXX.XXX.XXX - Identify the IP address for mail server named "mail".
;
; Aliases to existing nodes in domain
;
www IN CNAME node1 - Define the webserver "www" to be node1.
Secondary server (slave):
File: /etc/named.conf
options {
version "Bind"; - Don't disclose real version to hackers
directory "/var/named";
allow-transfer { none; };
recursion no;
fetch-glue no; - Bind 8 only! Not used by version 9
};
zone "your-domain.com"{
type slave;
file "named.your-domain.com";
masters { XXX.XXX.XXX.XXX; }; - IP address of primary DNS
};
zone "0.0.127.in-addr.arpa"{
type master;
file "named.local";
};