RHEl5-configure the DNS server

Source: Internet
Author: User
The DNS service is a complex service on the Linux platform. A simple DNS Service is now configured. For details, see the following. 1. Install DNS components 1. rpm-ivhbind * 2. rpm-ivhcaching-nameserver-9.3.3-10.el5 2. Copy the template configuration file, modify the configuration file. 1. Go to the following directory: cd/var/named/chroot/etc2. Copy the template.

The DNS service is a complex service on the Linux platform. A simple DNS Service is now configured. For details, see the following.

1. Install DNS Components

1. rpm-ivh bind *

650) this. width = 650; "border = 0>

2, rpm-ivh caching-nameserver-9.3.3-10.el5

2. Copy the template configuration file and modify the configuration file

1. Go to the following directory: cd/var/named/chroot/etc.

2. Copy the template cp-p name. caching-nameserver.conf named. conf

3. Modify the global configuration file vim named. conf.

Listen-on port 53 {any ;}Set127.0.0.1 is changed to any, indicating listening on any portAllow-query{Any ;}ChangeAny indicates that any host can be queried.

Match-client{Any ,}ChangeAny, indicating matching any master4. Modify the region configuration file and add the "linuxidc.com" and "0.168.192.in-addr. arpa" statements to the view tab. This statement can also be written in the named. rfc1912.zones file.View localhost_resolver {
Match-clients {localhost ;};
Match-destinations {localhost ;};
Recursion yes;
Zone "linuxidc.com" IN {
Type master;
File "linuxidc.com. zone ";
};Zone "0.168.192.in-addr. arpa" IN {
Type master;
File "192.168.0.zone ";
};

Include "/etc/named. rfc1912.zones ";
};
3. Copy the forward resolution template and modify the forward resolution File
1. Go to the forward resolution template configuration file cd/var/named/chroot/var/named2. copy the forward resolution template file cp-P named. zero linuxidc.com. zone3. Edit the forward parsing template file Vim linuxidc.com. zone and add the following record to the last line: wwwIn a 192.168.0.105[Root @ mail named] # cat linuxidc.com. zone
$ TTL 86400
@ In soa localhost. root. localhost .(
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns localhost.
Mail in a 192.168.0.106
Www in a 192.168.0.105
4. Copy the reverse resolution template and modify the reverse resolution File 1. Go to the reverse resolution template configuration file cd/var/named/chroot/var/named2. copy the reverse resolution template file cp-P named. local 192.168.0.zone3. Edit the reverse resolution configuration file Vim 192.168.0.zone and change the last two lines to INNS linuxidc.com106In ptr mail. linuxidc. Com[Root @ mail named] # cat 192.168.0.zone
$ TTL 86400
@ In soa localhost. root. localhost .(
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns linuxidc.com.
106 in ptr mail.linuxidc.com.
5. Restart the named service and view the logService named restartTail-f/var/log/message6. Configure the client [Root @ mail named] # cat/etc/resolv. conf
; Generated by/sbin/dhclient-script
Search linuxidc.com
Nameserver 192.168.0.106
7. Test the DNS server
 [Root @ mail named] # host mail.linuxidc.com
Mail.linuxidc.com has address 192.168.0.106
[Root @ mail named] # host 192.168.0.106
106.0.168.192.in-addr. arpa domain name pointer mail.linuxidc.com.

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.