BINDDNS internal training course 2

Source: Internet
Author: User
Tags nameserver

(6) master server:

The master server is the source of authorization for all information in the given domain. The domain information it loads comes from the domain information created by the domain administrator.

And locally maintained disk files.

We use "test.com" as an example. We need five basic configuration files:

/Etc/named. conf

/Var/named. ca

/Var/named. local

/Var/named/named.test.com

/Var/named/named.172.16.0

(6.1) create or modify/etc/named. conf:

// Generated by named-bootconf.pl

Options {

Directory "/var/named ";

/*

* If there is a firewall between you and nameservers you want

* To talk to, you might need to uncomment the query-source

* Directive below. Previous versions of BIND always asked

* Questions using port 53, but BIND 8.1 uses an unprivileged

* Port by default.

*/

// Query-source address * port 53;

};

//

// A PM nameserver config

All rights reserved by Beijing blue pioneer software Co., Ltd.

Address: Floor 6, hua'an business building, No. 10, East Street, Beijing

Website: www.bluepioneer.com.cn zip code: 100005 page 8th 14 pages

Tel: (010) 65594026 Fax: (010) 65594064

//

Zone '.'{

Type hint;

File "named. ca ";

};

Zone '0. 0.127.in-addr. arpa '{

Type master;

File "named. local ";

};

// There are our primary zone files

Zone "test.com "{

Type master;

File "named.test.com ";

};

Zone '0. 16.172.in-addr. arpa '{

Type master;

File 'named. 172.16.0 ';

};

The zone 'test. com' section in the file declares that this is the master server used for the test.com domain and is used for data in this domain.

Load from the/var/named/named.test.com file.

The zone '0. 16.172.in-addr. arpa 'section in the file directs to the mapped IP address 172.16.0. * to the host name.

File. The data used for this domain is loaded from the/var/named/named.172.16.0 file.

(6.2) create or modify/var/named. local

@ In soa ns.test.com. root.ns.test.com .(

2000051500; Serial

28800; Refresh

14400; Retry

3600000; Expire

86400); Minimum

In ns ns.test.com.

1 in ptr localhost.

Note: When modifying the named. * file, you must add the Serial value each time you save the disk. For example, when using an absolute domain name, do not forget to include '.'.

The @ character IN the resource record is converted to the current domain test.com, IN indicates that the resource record uses the TCP/IP address, and SOA indicates that the jurisdiction begins to record .ns.test.com. is the standard name of the primary DNS server for this domain, which is subsequently associated

EMAIL address. The @ character must be replaced.

(6.3) create or modify/var/named/named.test.com

@ In soa ns.test.com. root.ns.test.com .(

2000051500; Serial

28800; Refresh

14400; Retry

3600000; Expire

86400); Minimum

In ns ns.test.com.

Ns A 172.16.0.1

NSA 172.16.0.11

Www A 172.16.0.2

Ftp CNAME www.test.com.

Mail A 172.16.0.3

MX 10 mail.test.com.

(6.4) create or modify/var/named/named.172.16.0

@ In soa ns.test.com. root.ns.test.com .(

2000051500; Serial

28800; Refresh

14400; Retry

3600000; Expire

86400); Minimum

In ns ns.test.com.

1 in ptr ns.test.com.

11 in ptr ns1.test.com.

2 in ptr www.test.com.

3 in ptr mail.test.com.

(7) auxiliary servers

The secondary server obtains a complete copy of the domain information from the primary server. The secondary server can also perform domain query in an authorized manner. We use 'test. com' as an example. We need five basic configuration files:

/Etc/named. conf

/Var/named. ca

/Var/named. local

(7.1) create or modify/etc/named. conf:

// Generated by named-bootconf.pl

Options {

Directory "/var/named ";

/*

* If there is a firewall between you and nameservers you want

* To talk to, you might need to uncomment the query-source

* Directive below. Previous versions of BIND always asked

* Questions using port 53, but BIND 8.1 uses an unprivileged

* Port by default.

*/

// Query-source address * port 53;

};

//

// A SM nameserver config

//

Zone '.'{

Type hint;

File "named. ca ";

};

Zone '0. 0.127.in-addr. arpa '{

Type master;

File "named. local ";

};

// There are our slave zone files

Zone "test.com "{

Type slave;

File "named.test.com ";

Masters {172.16.0.1 ;};

};

Zone '0. 16.172.in-addr. arpa '{

Type slave;

File 'named. 172.16.0 ';

Masters {172.16.0.1 ;};

};

In the file 'masters {172.16.0.1 ;}; ', the IP address is the IP address of the master server in your network. Copy the files/var/named. ca and/var/named. local from the master server. The actual running server can be one of the above configurations, and also contain multiple configurations, but all systems should run the parser.

Article entry: csh responsible editor: csh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.