Ubuntu DNS BIND9 Configuration

Source: Internet
Author: User
Tags domain name server

The following configuration is to implement parsing test.zp.com to a different IP address

Installing the DNS server package
$ apt-get Install BIND9

Configure DNS
The path to the configuration file is below the/etc/bind path
Add a Zone
$/etc/bind# vim/etc/bind/named.conf.local
To add the following syntax, you can refer to the syntax in/etc/bind/zones.rfc1918, as follows:

Zone "zp.com" {type master; file "/etc/bind/db.zp.com";};

Modify the configuration file for db
$/etc/bind# cp db.local db.zp.com
$/etc/bind# Vim db.zp.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ in SOA zp.com. Root.localhost. (
2; Serial
604800; Refresh
86400; Retry
2419200; Expire
604800); Negative Cache TTL
;
@ in NS localhost.
@ in A 127.0.0.1
@ in AAAA:: 1
Test in A 192.168.0.11
Test in A 192.168.0.12
Test in A 192.168.0.13
Test in A 192.168.0.14
Test in A 192.168.0.15
Test in A 192.168.0.16


To modify the/etc/bind/named.conf.option configuration file, you can set the order of the given results of bind Round-robin in named.conf:

Rrset-order {order cyclic;};

Rrset-order supports three parameters: fixed, random, cyclic.
Fixed will fix multiple A records in the configuration file order
Random will give the
The cyclic will circulate to give
Restart Service
$/etc/bind#/etc/init.d/bind9 Restart
Check configuration effects
Modify the domain name resolution configuration file
$/etc/bind# vim/etc/resolv.conf
NameServer 192.168.0.***
Add the IP address of your domain name server
$ dig test.zp.com

A simpler choice DNSMASQ

Ubuntu DNS BIND9 Configuration

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.