Debian 5.04 Lenny configure DNS Server

Source: Internet
Author: User

The system used in this article is the latest stable version of Debian. Many tutorials do not expire, and the bind9 configuration file has changed a lot.

Use the include Method for configuration.

 

Several documents used in this article:

/Etc/bind/name. conf. Local

/Var/Cache/bind/

Set the host name to example when the local domain name is used to install the system

1. Install

# Apt-Get install bind9

2. Planning

Local IP Address: 192.168.1.10

Default Domain Name: example.test.com // test.com is not actually registered, it is actually a LAN

3. Edit the configuration file

 

① Edit named. conf. Local
Add the following statements
// Reverse Region
Zone "1.168.192.in-ADDR. Arpa "{
Type master;
File "/etc/bind/db.192.168.1 ";
};
// Forward Region
Zone "example.test.com "{
Type master;
File "/etc/bind/db.example.test.com ";
};

② Create the db.192.168.1 file under/etc/Bind

$ TTL 604800
@ In SOA example.test.com. root.example.test.com. (// note that there is a point later
1; Serial
604800; refresh
86400; retry
2419200; expire
604800); negative cache TTL;
@ In NS example. Test. com. // note
10 In PTR example.test.com.

③ Create the db.example.test.com file under/etc/Bind

$ TTL 604800
@ In SOA example.test.com. root.example.test.com .(
1; Serial
604800; refresh
86400; retry
2419200; expire
604800); negative cache TTL;
@ In NS example.test.com.
Example in a 192.168.1.10

4. Copy

Copy the two created dB files to the/var/Cache/bind/folder.

5. Restart named.

Rndc reload

Rndc reconfig
/Etc/init. d/bind9 restart
DNS configuration is complete at this location

6. Test

Ping example.test.com.

Ping 192.168.1.10. If name analysis exists, the configuration is successful.

Similarly, you can use NSLookup to test whether a relative result is displayed by entering the domain name and IP address.

 

The standard is just a guide. There should be many zones in the real DNS, and you can add the host to the current DNS server continuously. (add the IP address and domain name of the host. Note,

The host must have the same domain name: test.com, and different host names). Follow the instructions in this article to add the domain name. The real DNS server is successfully configured.

Note: bind9 must be restarted after the configuration file is changed.

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.