DNS

From WeWeWeb Wiki
Jump to navigationJump to search

In CentOS, the following packages are related to DNS:

  1. bind..............................DNS 主程式
  2. bind-chroot..................將 bind 主程式關在家理
  3. bind-utils......................用戶搜詢主機名稱的相關指令
  4. system-config-bind
  5. caching-nameserver

Only the first three packages are required to install.

Following the following steps:

1. In /usr/share/doc/bind-9.3.6/sample/ there are two directories etc/ and var/ copy the files to etc/ 及 var/named/ under /var/named/chroot/.

2. Update the named.conf file.

3. There are lines like:

 key ddns_key {
       algorithm hmac-md5;
       secret "use /usr/sbin/dns-keygen to generate TSIG keys";
 };

If you don't need dynamic update, you can disable it. For gen the key accordingly. You can also use:

 Include "/etc/named.keys";

And put all key values in that file.

4. Put all the zone information inside the view section.

5. To enable write of master zone, put 'ENABLE_ZONE_WRITE=yes' in /etc/sysconfig/named.

6. Start named service

 service named start

Goto Linux