Original CentOS for Smart DNS

Source: Internet
Author: User

First, Environment:

centos-6.6-x64 -bit operating system, IP Address: 210.38.248.7

Second, Installation and Configuration Bind Service:

1. command:yum Install bind

2. configuration:

1) Configuration /etc/named.conf File:

ACL ip1{

210.38.240.0/24; Defining a 240 network segment

};

ACL ip2{

210.38.248.0/24; Defining a 248 network segment

};

Options {

Directory "/var/named"; Service installation directory

recursion Yes; Whether to turn on DNS recursion

};

View "First" {

match-clients {ip1;}; Match 240 network segments

recursion Yes;

Zone "." in {

Type hint;

File "named.ca";

};

Zone "A.org" in {

Type master;

File "A.org.first";

};

Zone "1.168.192.in-addr.arpa" in {

Type master;

File "1.168.192";

};

};

View "Second" {

match-clients {ip2;}; Match 248 network segments

Recursion No;

Zone "." in {

Type hint;

File "named.ca";

};

Zone "A.org" in {

Type master;

File "A.org.second";

};

Zone "5.168.192.in-addr.arpa" in {

Type master;

File "5.168.192";

};

};

2) Establish A.org.first and the A.org.second file and configure:

- Create: touch A.org.first

Touch A.org.second

- Configuration:

Configuration A.org.first as follows :

$TTL 1200

$ORIGIN a.org.

@ in SOA ns1.a.org. Admin.a.org. (

2014091301

6H

30M

15D

3D)

In NS ns1.a.org.

In NS ns2.a.org.

In MX ten mail.a.org.

NS1 in A 192.168.1.5

NS2 in A 192.168.1.6

Mail in A 192.168.1.7

www in A 192.168.1.8

Configuration A.org.first as follows :

$TTL 1200

$ORIGIN a.org.

@ in SOA ns1.a.org. Admin.a.org. (

2014091301

6H

30M

15D

3D)

In NS ns1.a.org.

In NS ns2.a.org.

In MX ten mail.a.org.

NS1 in A 192.168.5.5

NS2 in A 192.168.5.6

Mail in A 192.168.5.7

www in A 192.168.5.8

Configuration 1.168.192 as follows :

$TTL 86400

@ in SOA ns1.a.org. Admin.a.org. (

2014091301

6H

30M

15D

3D)

In NS ns1.a.org.

In PTR a.org.

5 in PTR ns1.a.org.

6 in PTR ns2.a.org.

7 in PTR mail.a.org.

8 in PTR www.a.org

Configuration 5.168.192 as follows :

$TTL 86400

@ in SOA ns1.a.org. Admin.a.org. (

2014091301

6H

30M

15D

3D)

In NS ns1.a.org.

In PTR a.org.

5 in PTR ns1.a.org.

6 in PTR ns2.a.org.

7 in PTR mail.a.org.

8 in PTR www.a.org

- Copy files to /var/named Directory:

#cp a.org.*/var/named

#cp 1.168.192/var/named

#cp 5.168.192/var/named

3. Restart :service named restart

Third, test: in the 240/248 network segment of the computer terminal using the command: nslookup ns1.a.org (domain name) test, to view the resolved IP address.

Original CentOS for Smart DNS

Related Article

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.