DNS configuration for north-south communication under RedHatAS4U3

Source: Internet
Author: User
Tags nameserver
Article title: DNS configuration for North-South intercommunication under RedHatAS4U3. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

This is a practical article. if you do not know what DNS is and some simple knowledge of bind, you should first understand it.
First, check whether the system has bind
# Rpm-qa | grep bind
I am using the bind: bind-9.2.4-2 version that comes with redhatas4u3. (if there is no bind, download a source code package, for more information about how to install the tool, see this document)
If the bind that comes with the system is installed under/var/named/chroot (if you do not know it, google it)
The specific operations are as follows:
# Cd/var/named/chroot/etc // enter The etc directory in the chroot environment
(We recommend that you back up the existing configuration file before editing the configuration file !!!)
# Vi named. conf // edit the bind main configuration file
//
// Named. conf for Red Hat caching-nameserver
//
Options {
Directory "/var/named ";
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/data/named_stats.txt ";
/*
* 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 caching only nameserver config
//
Controls {
Inet 127.0.0.1 allow {localhost;} keys {rndckey ;};
};
Acl "telecom "{
I won't cp the DNS of many telecom companies. it's too much! I wrote more than 1 K Records.
....
....
};
View "telecom "{
Match-clients {TELECOM ;};
Zone "."{
Type hint;
File "named. ca ";
};
Zone "0.0.127.IN-ADDR. ARPA "{
Type master;
File "localhost. rev ";
};
Zone "test.com "{
Type master;
File "master/telecom/test.com ";
};

};
View "any "{
Match-clients {any ;};
Zone "."{
Type hint;
File "named. ca ";
};
Zone "0.0.127.IN-ADDR. ARPA "{
Type master;
File "localhost. rev ";
};
Zone "test.com "{
Type master;
File "master/cnc/test.com ";
};
};
Include "/etc/rndc. key ";
// Save and exit after editing.
# Mkdir/var/named/chroot/var/named/master/
# Mkdir/var/named/chroot/var/named/master/telecom
# Mkdir/var/named/chroot/var/named/master/cnc
# Vi/var/named/chroot/var/named/master/telecom/test.com
$ TTL 86400
@ In soa ns.test.com. root.ns.test.com .(
2005062301; serial
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns ns.test.com.
In mx 10 mail.test.com.
Www in a telecom IP address
// Save and exit
# Vi/var/named/chroot/var/named/master/cnc/test.com
$ TTL 86400
@ In soa ns.test.com. root.ns.test.com .(
2005062301; serial
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns ns.test.com.
In mx 10 mail.test.com.
Www in a Netcom IP
// Save and exit
# Service named start
Do not forget to modify the/etc/resolv. conf file!
# Dig @ IP www.test.com
If there is a problem during the dns test, we can analyze the resolution error:
1) if none of the services are available, check the configuration file named. conf ({} in this file is annoying !!)
2) if the service is started but cannot be parsed properly, there are generally two cases (I have only seen two cases)
Host www.test.com not found: 2 (SERVFAIL) The resolution result is similar. this is generally because the parsing file cannot find the path to check the file, named. the file path specified in conf must have your parsing file
Another one is 3 (I don't remember the specific statement). This is because there is a problem with the parsing file. The implication is that the configuration of named. conf has been matched with the parsing file! But the parsing is not correct!
This article from the "to get the end, must first to the blog, please be sure to keep this source http://weijia.blog.51cto.com/616222/119913

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.