Debian2.6.18 bind9 installation and configuration

Source: Internet
Author: User
Debian2.6.18 bind9 installation and configuration-Linux Release Technology-Debian information, the following is a detailed description. 1. Install

Sudo apt-get install bind9

2. edit/etc/bind/named. conf. options and add the following content:

Forwarders {

202.96.134.133; // This is the DNS in Shenzhen. I am in Shenzhen. Please check the local DNS in other places.

202.96.128.68; // Add a DNS in Guangdong

};

3. edit/etc/bind/named. conf. local and add the following content:

Zone "example.com" {// example.com is the domain name

Type master;

File "/etc/bind/db.example.com ";

};

# The above is set as a positive solution. If the forward solution domain name to be set has been registered as a valid domain name, there is no need for reverse resolution settings. In general, the forward and reverse resolution settings must appear in pairs, the following is anti-solution settings

Zone "1.168.192.in-addr. arpa" {// The LAN segment is 192.168.1.0/24,. in-add.arpa is required

Type master;

File "/etc/bind/db.192.168.1 ";

};

4. Edit the domain file, that is, the preceding db.example.com and db.192.168.1

Sudo cp/etc/bind/db. local/etc/bind/db.example.com // use an existing domain file as the template

Edit db.example.com to the following content:

;

; BIND data file for local loopback interface

;

$ TTL 604800

@ In soa dns.example.com. root.example.com .(

1; Serial

604800; Refresh

86400; Retry

2419200; Expire

604800); Negative Cache TTL

;

@ In ns dns.example.com. // dns.example.com.

@ In a 192.168.1.254 // 192.168.1.254 is the IP address of the dns server host IN the LAN.

Sudo cp/etc/bind/db.example.com/etc/bind/db.192.168.1 // use an existing domain file as the template

Edit db.192.168.1 to the following content:

;

; BIND data file for local loopback interface

;

$ TTL 604800

@ In soa dns.example.com. root.example.com .(

1; Serial

604800; Refresh

86400; Retry

2419200; Expire

604800); Negative Cache TTL

;

@ In ns dns.example.com.

254 in ptr dns.example.com. // here 254 refers to IP192.168.1.254

5. start/stop/restart the bind Service

Sudo/etc/init. d/bind start | stop | restart

########### End of configuration ####################

6. Introduce the confusing characters in the above configuration file

@: Refers to the content in the double quotation marks corresponding to the zone statement in name. conf. option, for example, zone "example.com". @ in db.example.com refers to example.

SOA: this is the meaning of the content set by Start of Authority.

IN: The meaning of English in. Here is the meaning of "corresponding ".

NS: Abbreviation of name server

A: Positive Solution symbol. The so-called positive solution is to query the IP address "192.168.1.254" based on the domain name "dns.example.com"

PTR: Indicates reverse decoding. The so-called reverse decoding is to query the domain name "dns.example.com" based on the IP address "192.168.1.254"

Note: During the configuration process, the local DNS needs to be cleared. Otherwise, the operation fails.
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.