•Register with Network Solutions (or your favorite registrar). Make sure the primary name server address points to the IP address of your soon-to-be DNS server.
•Download and install Bind.
•Setup your zone file in /var/named (or wherever you configured for).
Sample db.mydomain.com Zone File:
; mydomain.com
$TTL 86400
mydomain.com. IN SOA dns.mydomain.com. youremailaddress.mydomain.com. (
2001072300 ; Serial Number
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
;
; Name Servers
;
mydomain.com. IN NS dns.mydomain.com.
;
; Addresses for the canonical names
;
mydomain.com. IN A xxx.xxx.xxx.xxx
localhost.mydomain.com. IN A 127.0.0.1
dns.mydomain.com. IN A xxx.xxx.xxx.xxx
;
; Aliases that must be A records
;
mail.mydomain.com. IN A xxx.xxx.xxx.xxx
;
; Aliases
;
www.mydomain.com. IN CNAME dns.mydomain.com.
ftp.mydomain.com. IN CNAME dns.mydomain.com.
;
; Mail
;
mydomain.com. IN MX 5 mail.mydomain.com.
Sample reverse lookup db.127.0.0 file:
$TTL 86400
0.0.127.in-addr.arpa. IN SOA dns.mydomain.com. youremailaddress.mydomain.com. (
2000021100 ; Serial Number
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
0.0.127.in-addr.arpa. IN NS dns.mydomain.com.
1.0.0.127.in-addr.arpa. IN PTR localhost.
- Setup your named.conf configuration file in /etc (or wherever you've configured for).
Sample named.conf:
zone "mydomain.com" in {
type master;
file "db.mydomain.com";
};
// mandatory zones
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};
zone "." in {
type hint;
file "db.cache";
};
- Download named.root from Internic. Rename it db.cache and install into /var/named along with your zone file.
; This file is made available by InterNIC registration services
; under anonymous FTP as
; file /domain/named.root
; on server FTP.RS.INTERNIC.NET
; -OR- under Gopher at RS.INTERNIC.NET
; under menu InterNIC Registration Services (NSI)
; submenu InterNIC Registration Archives
; file named.root
- Add Bind to your system startup scripts, if it isn't there already.
- Start BIND
a) run /usr/sbin/named or
b) if it's already started, find its process number and kill -HUP processnumber
- Read the documentation for all options and security concerns for running BIND.
Good Luck!
Another good tutorial on how to setup and configure BIND 9 can be found at
Unixwiz.net thanks to
Steve.
got feedback?
got feedback?by statemachine
edited by howe81 
last modified: 2002-06-12 11:05:07