DNS installation and configuration of CentOS System DNS

Source: Internet
Author: User
Tags nameserver
System installation 2. Set the IP address, gateway, and DNS Convention: the first Nic is the Internet, and the second Nic is the Intranet (the Intranet must be configured on the second Nic for machines without the Internet)

I. Install software
Yum-y install bind-chroot bind-libs bind-utils caching-nameserver

Ii. Configuration

Cd/var/named/chroot/etc/
Cp-p named. caching-nameserver.conf named. conf

Options {
Directory "/var/named /";
};

Zone "test.com" IN {
Type master;
File "test.com. zone ";
};

Zone "linux.com" IN {
Type master;
File "linux.com. zone ";
};

Zone "1.168.192.in-addr. arpa" IN {
Type master;
File "192.168.1.zone ";
Allow-update {none ;};
};


Cd/var/named/chroot/var/named/
Cp-p localdomain. zone test.com. zone
Cp-p localdomain. zone linux.com. zone
Cp-p named. local 192.168.1.zone

# Test.com. zone

$ TTL 86400
@ In soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum

In ns @
In a 127.0.0.1
In aaaa: 1
Wwwtest in a 192.168.1.122
Dnstest in a 192.168.1.20.
Mytest3 in a 192.168.1.144


# Linux.com. zone

$ TTL 86400
@ In soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum

In ns @
In a 127.0.0.1
In aaaa: 1
Wwwtest in a 192.168.1.123
Dnstest in a 192.168.1.134
Mytest3 in a 192.168.1.145


# 192.168.1.zone

$ TTL 86400
@ In soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum

In ns @
In a 127.0.0.1
In aaaa: 1
192.168.1.123 in a wwwtest
192.168.1.134 in a dnstest
192.168.1.145 in a mytest3

Ii. Restart the named service

Service named restart

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.