How to set DNS on Linux server

  
        

Background: ---- The company connects to Chinanet with a dedicated line and obtains a Class C IP address space (for example, 16). At the same time, it applies to the ChinaNIC domain name yourdomain.com, and now sets up a machine as a DNS server. Also set as a firewall.

Objects: ---- Internet private line users

Software: ---- Redhat Linux 5.2

Implementation process:

The server is equipped with two Block network card, internal interface eth1 address is 192.168.11.5, external interface eth0 address is 202.abc machine name is set to dns.yourdomain.com, installation and configuration process is slightly

Redhat Linux 5.2 with CD is bind 8.X version, the following is my configuration: ----------[root@dns jephe]# more /etc/named.confoptions {directory "/var/named";forward first;forwarders {202.96.199.133;};};zone "."{type hint;file "root.hints";};zone "0.0.127.in-addr.arpa"{type master;file "127.0 .0";};zone "11.168.192.in-addr.arpa"{type master;file "192.168.11";};zone "yourdomain.com"{notify no;type master;file " Yourdomain.com";};---------

---- Note:

202.96.199.133 is a DNS server for Chinanet (ns.sta.net. Cn) .

root.hints contains the addresses of a set of root servers on the Internet, which can be downloaded from the Internet, (ft p://ftp.internic.net/domain/named.ca), then renamed to root.hints, you can also take another name, this area information is very important, must exist, in order to keep it up to date, generally monthly update once. You can also set a script file, and each time the automatic update

127.0.0 is the reverse parsing file of the machine's local interface, it will almost no need to be changed after setting.

192.168.11 is the reverse resolution information of some servers on the internal network segment.

yourdomain.com The file is a forward parsing file for the domain you are applying for. When you apply for the domain name yourdomain to ChinaNIC, in general, you also need to provide a DNS server to manage this domain, you can use dns.yourdomain.com (202.a.b.c).

This article comes from the programming portal: http://bianceng.cn/Servers/DNS/200707/3225.htm

Copyright © Windows knowledge All Rights Reserved