<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all, thanks in advance for any help. It is greatly appreciated.<br><br>I'm struggling a bit with setting up master and slave name servers. My goal is just to run my own name servers for mydomain.com. I am not concerned at all with any internal DNS configuration. There are no workstations or anything like that to worry about. The name servers are on different networks as you can see from the example WAN ip addresses. My main confusion stems from what to put in /etc/hosts and also what to use for reverse DNS. All of the examples I've seen typically use the LAN ip of the server, but some reference the WAN ip. I've tried various configurations, and sometimes things seem to work, but then they flake out or some things work and some things don't. For example, if I look up ns1.mydomain.com, I'll get the right IP, but if I on the
terminal of ns1, I cannot ping outside like google.com for instance. What I really need is for someone to confirm or correct the way I have my various config files set up. Below is the contents of each config file for both the master and slave servers. Please let me know if I have anything wrong, especially in regard to reverse dns and /etc/hosts since changing these files seems to have the biggest impact on what works and what doesn't. Here is the example information for my domain and servers. <br><br>* Note: The master and slave LAN ips are similar, but they are not on the same LAN.<br>The LAN ip of the master name server (ns1.mydomain.com) is 192.168.0.101<br>The WAN ip of the master name server (ns1.mydomain.com) is 111.122.133.144 <br>The LAN ip of the secondary name server (ns2.mydomain.com) is 192.168.0.202<br>The WAN ip of the secondary name server (ns2.mydomain.com) is 222.233.244.255<br>The WAN ip of the mail server is
77.77.77.77<br>The WAN ip of mydomain.com is 88.88.88.88<br><br>############################<br>## Master Name Server ## <br>############################<br>## ns1.mydomain.com Files ##<br>############################<br><br>File: /etc/hosts<br><br>127.0.0.1 localhost.localdomain localhost<br>111.122.133.144 ns1.mydomain.com ns1 <br><br># should ^ this be 192.168.0.101 instead?<br><br>###################################################################<br><br>File: /etc/bind/named.conf.local<br><br>zone "mydomain.com" {<br> type master;<br> file "/etc/bind/zones/mydomain.com.db";<br> allow-transfer { 222.233.244.255; };<br>};<br><br>zone "133.122.111.in-addr.arpa" {<br> type master;<br> file "/etc/bind/zones/rev.133.122.111.in-addr.arpa";<br>};<br><br>// Should the reverse DNS be this instead?:<br>//
zone "0.168.192.in-addr.arpa" {<br>// type master;<br>// file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";<br>// };<br><br>###################################################################<br><br>File: /etc/bind/zones/rev.133.122.111.in-addr.arpa (Obviously if the reverse DNS above is wrong, then this file would be named: /etc/bind/zones/rev.0.168.192.in-addr.arpa and the PTR would be 101 instead of 144.)<br><br>$TTL 1500<br>@ IN SOA ns1.mydomain.com admin.mydomain.com (<br> 2009012324 ;serial<br>
28800 ;refresh<br> 3600 ;retry<br> 604800 ;expire<br> 38400 ) ;minimum 25 minutes<br><br>
IN NS ns1.mydomain.com.<br>144 IN PTR ns1.mydomain.com.<br><br>###################################################################<br><br>File: /etc/bind/zones/mydomain.com.db<br><br>$TTL 1500<br>@ IN SOA ns1.mydomain.com. admin.mydomain.com (<br> 2009012324 ;serial<br> 28800
;refresh<br> 3600 ;retry<br> 604800 ;expire<br> 38400 ) ;minimum 25 minutes<br><br>mydomain.com. IN NS ns1.mydomain.com.<br>mydomain.com.
IN NS ns2.mydomain.com.<br>ns1 IN A 111.122.133.144<br>ns2 IN A 222.233.244.255<br>mail IN A 77.77.77.77<br>mydomain.com. IN A 88.88.88.88<br>mydomain.com. IN MX 10
mail.mydomain.com.<br><br>###################################################################<br><br>File: /etc/bind/named.conf.options<br><br>options {<br> directory "/var/cache/bind";<br><br> forwarders {<br> 123.123.123.123; // My ISP's DNS server.<br> };<br><br> auth-nxdomain no; # conform to RFC1035<br> listen-on-v6 { any; };<br>};<br><br>###################################################################<br><br>File: /etc/resolv.conf<br><br>domain mydomain.com<br>search mydomain.com<br>nameserver 111.122.133.144<br><br># Should ^ this be 192.168.0.101 instead?<br><br>###################################################################<br><br>File:
/etc/hostname<br><br>ns1.mydomain.com<br><br>###################################################################<br>## Secondary Name server ###<br>############################<br>## ns2.mydomain.com Files ##<br>############################<br><br>File: /etc/bind/named.conf.local<br><br><br>zone "mydomain.com" {<br> type slave;<br> file "/etc/bind/zones/mydomain.com.slave.db";<br> masters { 111.122.133.144; };<br>};<br><br>zone "163.174.65.in-addr.arpa" {<br> type master;<br> file "/etc/bind/zones/rev.163.174.65.in-addr.arpa";<br>};<br><br>// Should the reverse DNS be this instead?:<br>// zone "0.168.192.in-addr.arpa" {<br>// type master;<br>// file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";<br>// };<br><br>// ALSO: Should the reverse DNS zone type be "slave" instead of
master?<br><br>###################################################################<br><br>File: /etc/bind/zones/rev.244.233.222.in-addr.arpa (Obviously if the reverse DNS above is wrong, then this file would be named: /etc/bind/zones/rev.0.168.192.in-addr.arpa and the PTR would be 202 instead of 255.)<br><br><br>$TTL 1500<br>@ IN SOA ns2.mydomain.com admin.mydomain.com (<br> 2009012324 ;serial<br> 28800
;refresh<br> 3600 ;retry<br> 604800 ;expire<br> 38400 ) ;minimum 25 minutes<br> IN NS
ns2.mydomain.com.<br>255 IN NS ns2.mydomain.com.<br><br>###################################################################<br><br>File: /etc/hosts<br><br>127.0.0.1 localhost.localdomain localhost<br>222.233.244.255 ns2.mydomain.com ns2<br><br># Should ^ this be 192.168.0.202 instead?<br><br>###################################################################<br><br>File: /etc/bind/named.conf.options<br><br>options {<br> directory "/var/cache/bind";<br><br> forwarders {<br> 231.231.231.231; // My ISP's DNS server.<br>
};<br><br> auth-nxdomain no; # conform to RFC1035<br> listen-on-v6 { any; };<br>};<br><br>###################################################################<br><br>File: /etc/resolv.conf<br><br>domain mydomain.com<br>search mydomain.com<br>nameserver 222.233.244.255<br><br># Should ^ this be 192.168.0.202 instead?<br><br>####################################################################<br><br>File: /etc/hostname<br><br>ns2.mydomain.com<br><br>####################################################################<br><br>File: /etc/bind/zones/mydomain.com.slave.db<br><br>// To be updated by bind9 automatically from master server's config<br><br>####################################################################<br><br>Thanks so much for any help, I really do appreciate it.<br><br>Mark W.</td></tr></table><br>