Configuration for BIND9 (1)
To configure a DNS, I think it is important to be 2. 1 is to know what bind9 can do, on the other hand, know what I need.
What does Bind9 do.
The first aspect: relatively simple, Bind9 can do DNS services to provide us with DNS queries. Simply, you can configure a computer name inside a domain.
And the domain's mail server to meet the query of other machines. Options {Directory "/ etc / namedb"; pid-file "/var/run/named/named.pid";
"." {Type Hint; file "db.cache";}; this is the simplest configuration. Can already run.
In the second aspect, what we want to do for us. The first is to provide us with the query of my domain. Add zone "Test.com.cn" {TYPE MASTER; File "Test.com.cn.hosts";}; then, add file Test.com.cn.hosts in the directory / etc / namedb / The contents of the document are as follows. In SOA DNS.TEST.COM.CN. Crab.idmt.com.cn. (1111650709 10800 3600 604800 38400) Test.com.cn. In ns dns.test.com. Cn.dns.test.com.cn. IN A 192.168.0.170 The specific content means adding NS, A record, or sets refresh time, expiration time, etc.