In Linux, the DNS server may have problems during configuration.
Source: Internet
Author: User
In Linux, the DNS server may encounter problems during configuration-Linux Enterprise Application-Linux server application information. The following is a detailed description. After reading many DNS configuration manuals, I cannot follow the instructions or modify them. I have never been correctly configured, and I have always been unable to parse forward resolution. finally, in a configuration, the configuration was successful.
The following is an example of my DNS Configuration:
1. required configuration file:
/Etc/named. conf system comes with and needs to be configured
/Etc/resolv. conf system comes with and needs to be configured
/Var/named/myqmail.com. db system not available, self-created
/Var/named/db.192.168.0.198 system not available, self-created
/Var/named. local system comes with no need to modify
/Var/named. ca system comes with no need to modify
2 related tools
Nslookup
Note: This tool is provided to check whether DNS is configured correctly.
3. configuration Scheme
3.1/etc/named. conf
Note: The DNS master configuration file defines the basic parameters and source points of the domain database information, which can be stored locally or remotely on the server. Source file:
// 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 caching only nameserver config
//
Controls {
Inet 127.0.0.1 allow {localhost;} keys {rndckey ;};
};
Zone "." IN {
Type hint;
File "named. ca ";
};
Zone "localhost" IN {
Type master;
File "localhost. zone ";
Allow-update {none ;};
};
Zone "0.0.127.in-addr. arpa" IN {
Type master;
File "named. local ";
Allow-update {none ;};
};
Zone "myqmail.com" IN {
Type master;
File "myqmail.com. db ";
Allow-update {none ;};
};
Zone "0.168.192.in-addr. arpa" IN {
Type master;
File "db.192.168.0.198 ";
Allow-update {none ;};
};
Include "/etc/rndc. key ";
3.2/var/named/myqmail.com. db
Note: The forward resolution configuration file is used to implement the corresponding domain name to IP address. Source file:
$ TTL 86400
@ In soa www.myqmail.com. myqmail.com .(
2002103000; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns www.myqmail.com.
Localhost in a 127.0.0.1
Www in a 192.168.0.198
3.3/var/named/db.192.168.0.198
Note: DNS reverse resolution configuration files are used to map IP addresses to domain names. Source file:
$ TTL 86400
@ In soa www.myqmail.com. myqmail.com .(
2002103000; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns www.myqmail.com.
198 in ptr www.myqmail.com.
3.4/etc/resolv. conf
Description: IP address and search sequence of the Domain Name Server. Source file:
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