I've finally worked out how do do this. I've never used bind before so heres a simple howto with a live example:
----------------------------
Obective: set up a domain capriolepark.com, with nameservers ns1.capriolepark.com and ns2.capriolepark.com.
Environment: Redhat 9, firehol fiirewall, bind9 for DNS
1. Register capriolepark.com with godaddy.com
2. My linode IP is 64.5.53.79; order 2 more IPs for domain servers (using linode control panel) & get 70.85.16.70 & 70.85.16.71
3. In the godaddy control panel set:
Nameservers Summary:
NS1.CAPRIOLEPARK.COM
NS2.CAPRIOLEPARK.COM
Domain Host Summary:
NS1.CAPRIOLEPARK.COM
70.85.16.70
NS2.CAPRIOLEPARK.COM
70.85.16.71
4. "Domain host summary" is the most important bit; it registers the ns*.caproplepark.com nameservers with the root naameservers
5. Firewall: open port 53 in firehol
server dns accept
6. Set up bind with logging:
File:/etc/named.conf
options {
directory "/var/named";
};
logging {
category "default" { "debug"; };
category "general" { "debug"; };
category "database" { "debug"; };
category "security" { "debug"; };
category "config" { "debug"; };
category "resolver" { "debug"; };
category "xfer-in" { "debug"; };
category "xfer-out" { "debug"; };
category "notify" { "debug"; };
category "client" { "debug"; };
category "unmatched" { "debug"; };
category "network" { "debug"; };
category "update" { "debug"; };
category "queries" { "debug"; };
category "dispatch" { "debug"; };
category "dnssec" { "debug"; };
category "lame-servers" { "debug"; };
channel "debug" {
file "/tmp/nameddbg" versions 2 size 50m;
print-time yes;
print-category yes;
};
};
zone "capriolepark.com" {
type master;
file "capriolepark.com";}
;
File /var/named/capriolepark.com
$TTL 60
@ IN SOA ns1.capriolepark.com. root.capriolepark.com. (
200409218 ; serial, todays date + todays serial #
60 ; refresh, seconds
60 ; retry, seconds
60 ; expire, seconds
60 ) ; minimum, seconds
NS ns1.capriolepark.com.
NS ns2.capriolepark.com.
MX 10 mail.capriolepark.com. ; Primary Mail Exchanger
TXT "Capriole Park"
capriolepark.com. IN A 64.5.53.79
7. Start named (bind server) & examine logs:
Starting named: File /var/log/mesages
Feb 2 10:58:32 li-79 named[19392]: starting BIND 9.2.1
Feb 2 10:58:32 li-79 named[19392]: using 1 CPU
Feb 2 10:58:32 li-79 named[19394]: loading configuration from '/etc/named.conf'
Feb 2 10:58:32 li-79 named[19394]: listening on IPv4 interface lo, 127.0.0.1#53
Feb 2 10:58:32 li-79 named[19394]: listening on IPv4 interface eth0, 64.5.53.79#53
Feb 2 10:58:32 li-79 named[19394]: listening on IPv4 interface eth0:1, 70.85.16.70#53
Feb 2 10:58:32 li-79 named[19394]: listening on IPv4 interface eth0:2, 70.85.16.71#53
Feb 2 10:58:32 li-79 named[19394]: command channel listening on 127.0.0.1#953
Feb 2 10:58:32 li-79 named[19394]: command channel listening on ::1#953
DNS requests come in: Log File /tmp/nameddbg:
eb 03 03:02:15.750 queries: client 203.194.56.150#39372: query: ns1.capriolepark.com IN A6
Feb 03 03:02:17.745 queries: client 203.194.56.150#39372: query: ns2.capriolepark.com IN A6
Feb 03 05:21:28.003 queries: client 216.145.1.3#32872: query:
www.capriolepark.com IN A
Feb 03 05:21:29.030 queries: client 216.145.1.2#32843: query:
www.capriolepark.com IN A
Feb 03 05:21:29.031 queries: client 216.145.1.3#32872: query:
www.capriolepark.com IN A
Feb 03 05:22:40.647 queries: client 69.56.173.6#59764: query: ns1.capriolepark.com IN AAAA
Feb 03 05:23:06.746 queries: client 69.56.173.6#59764: query: capriolepark.com IN A
8: Note: DNS security will need to be tightened