here are some config files...
there is alot of info below so beware!
i have it setup to use /var/named as the zone file directory... you might use the /etc/namedb structure. but everything should just copy and paste over fine.
okay... put this in your named.conf file in /etc
//***********options********
//****i use /var/named for directory and this is where you set that****
options {
directory "/var/named";
};
//******zones*******
//********localhost zones first*****
zone "." {
type hint;
file "named.root";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
};
//****put this in if you want reverse zone for internal network***
//****change the IPs for your number scheme if different than mine***
zone "1.168.192.in-addr.arpa" {
type master;
file "/var/named/192.168.1.rev";
};
//****your internal network zones*****
zone "yourdomain.com" {
type master;
file "yourdomain.com.hosts";
};
zone "yourdomain.net" {
type master;
file "yourdomain.net.hosts";
};
zone "yourdomain.org" {
type master;
file "yourdomain.org.hosts";
};
//*****end of file*****
okay now put these in your /var/named/ directory each named yourdomain.com etc....
; Zone file for yourdomain.com
; Change IPs and names to your own
; The full zone file
$TTL 7D
;
@ IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200 ; serial, date and serial #
1200 ; refresh, in seconds
600 ; retry, seconds
7D ; expire, seconds
3600 ) ; minimum, seconds
;
@ NS nameserver.yourdomain.com. ; your nameserver
@ MX 10 mail.yourdomain.com.
;
@ A 192.168.1.xxx
mail A 192.168.1.xxx
www A 192.168.1.xxx
ftp A 192.168.1.xxx
;
; End of File
next one... .net domain... make this file called yourdomain.net.hosts. just make everything the same as .com zone file but just name it yourdomain.net instead. also internally if you want to get mail for you .net domain separatly name you MX record .net. instead of .com.... but just leave it all the same if your for now so it'll work how you want.
; Zone file for yourdomain.net
; Change IPs and names to your own
; The full zone file
$TTL 7D
;
@ IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200 ; serial, date and serial #
1200 ; refresh, in seconds
600 ; retry, seconds
7D ; expire, seconds
3600 ) ; minimum, seconds
;
@ NS nameserver.yourdomain.com. ; your nameserver
@ MX 10 mail.yourdomain.com.
;
@ A 192.168.1.xxx
mail A 192.168.1.xxx
www A 192.168.1.xxx
ftp A 192.168.1.xxx
;
; End of File
now .org.... again this file is called yourdomain.org.hosts. just the same as other two files.
; Zone file for yourdomain.com
; Change IPs and names to your own
; The full zone file
$TTL 7D
;
@ IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200 ; serial, date and serial #
1200 ; refresh, in seconds
600 ; retry, seconds
7D ; expire, seconds
3600 ) ; minimum, seconds
;
@ NS nameserver.yourdomain.com. ; your nameserver
@ MX 10 mail.yourdomain.com.
;
@ A 192.168.1.xxx
mail A 192.168.1.xxx
www A 192.168.1.xxx
ftp A 192.168.1.xxx
;
; End of File
ok that should be it!
hopefully i didn't leave any typos.. (probably did knowing me)
so to add hosts just add more A records.
for example:
my-pimp-g4 A 192.168.1.xxx
my-little-imac A 192.168.1.xxx
also at if you don't have these files in your /var/named directory add them:
name this one localhost.zone
;
;
;
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
1D IN A 127.0.0.1
; End Of File
name this one localhost.rev
;
;
;
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
;End of File
to get the named.root file type this in the console:
[console]%dig > /var/named/named.root
(this get the root servers names and addresses and puts them in a file)
here is the file for a reverse zone set up as referenced in the named.conf file up top:
;
;
;where xxx is the last octet of your IP address
;and hostx represents your computer names
$ORIGIN 168.192.in-addr.arpa.
1 38400 IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200
10800
3600
432000
38400 ) ;Cl=5
38400 IN NS nameserver.yourdomain.com. ;Cl=5
xxx 38400 IN PTR host1.yourdomain.com. ;Cl=5
xxx 38400 IN PTR host2.yourdomain.com. ;Cl=5
;
;end of file
;
Lots of writing i know....!!!
but... good luck and hope this helps!
john...
[ 06-13-2001: Message edited by: johann ]