Learn 13 DNS configurations with me in linux (below)

Source: Internet
Author: User
Tags nslookup
Learn about the 13DNS configuration (below)-linux Enterprise Application-Linux server application information for Linux with me. The following is a detailed description. Continue to work
Let the people who don't reply to the post drop the chicken
Hey, let him know what it's like to be a eunuch.
Let's see how to add a reverse partition.
127.0.0 reverse Zone
[1] [root @ zy root] # vi/etc/named. conf edit the main configuration file
Add
Zone "0.0.127.in-addr. arpa" {a reverse zone must be suffixed with a in-addr.arpa
Type master; here we are doing the reverse zone of 127.0.0.1, so its format is like this.
File "127.0.0.zone"; Name the file as needed.
};
[2] [root @ zy named] # vi 127.0.0.zone
$ TTL 1D
@ In soa @ root. localhost. (20070731 1 H 15 M 1 W 1D)
In ns localhost.
1 in ptr localhost.
Here 1 refers to the 1 of 127.0.0.1, PTR refers to the pointer, and the 2nd @ In the first line refers to localhost.
This zone
[3] [root @ zy named] # service named restart
Restart the server. After the configuration is modified, the server must be restarted.
[4] [root @ zy named] # nslookup 127.0.0.1 test successful
If you fail to view
[Root @ zy named] # tail/var/log/messages find the cause by yourself
Zhaoyong.com reverse Zone
[1] [root @ zy root] # vi/etc/named. conf
Zone "1.168.192.in-addr. arpa "{
Type master;
File "192.168.1.zone ";
};
[2] [root @ zy named] # vi 192.168.1.zone
@ In soa zhaoyong.com. root.zhaoyong.com. (20070731 1 H 15 M 1 W 1D) 20070731 is the version information of the server.
In ns zhaoyong.com.
101 in ptr www.zhaoyong.com.
102 in ptr mail.zhaoyong.com.
101 in ptr news.zhaoyong.com.
[3] [root @ zy named] # service named restart
[4] [root @ zy named] # nslookup 192.168.1.102 test successful
Next we will configure a secondary Domain Name Server
The secondary Domain Name Server is used to back up data on the primary server. When the primary server goes offline or crashes, it works on behalf of the primary server.
[1] First, make sure that your master server can work.
The domain name of my master server is zhaoyong.com.
[Root @ zy named] # host-t SOA zhaoyong.com can work.
[2] Then we log on to the machine that you intend to use as the secondary Domain Name Server.
First, make sure that the namesever it uses is its own
[Root @ jj named] # more/etc/resolv. conf
Nameserver 127.0.0.1
[Root @ jj named] # vi/etc/named. conf edit the named. conf configuration file
Zone "zhaoyong.com" {added zhaoyong.com.
Type slave; type: Auxiliary domain
File "zhaoyong.com. zone ";
Masters {192.168.1.144;}; Do not forget the semicolon 144;
}; The address of the specified master server is 192.168.1.144. Note the space.
After this is written, when the server starts, it will automatically upload files to the auxiliary Server
[3] [root @ jj named] # chmod g + w/var/named/allow this directory to be writable and not to pass files
[4] [root @ jj named] # service named restart
[5] [root @ jj named] # ls/var/named/zhaoyong.com. zone
The file will be automatically created so that data synchronization is successful.
In the evening, I wrote the email server to support me.

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.