UbuntuDNS Server Configuration

Source: Internet
Author: User
Tags nameserver nslookup nslookup command
Server IP: 10.68.19.61 Operating System: Ubuntu13.04DNS program: Bind9 test domain: 88181.com Destination IP: 10.68.19.134 configuration step 1. Install the BIND9 package sudoapt-getinstallbind92, add edit file, two files need to be edited in total, add two files as follows: Modify/etc/bind/named. conf. options, remove forwarde

Server IP Address: 10.68.19.61
Operating System: Ubuntu 13.04
DNS program: Bind9
Test Domain Name: 88181.com
Target IP Address: 10.68.19.134

Procedure

1. Install the BIND9 package

Sudo apt-get install bind9

2. Add and edit files. A total of two files need to be edited. Add two new files, as shown below:

Modify/etc/bind/named. conf. options and remove the forwarders comment. The IP address is the DNS server provided by the Network Carrier. Here we use google DNS

Forwarders {
8.8.8.8;
8.8.4.4;
};

Modify/etc/bind/named. conf. local and add the bidirectional parsing code at the end:

Zone "88181.com "{
Type master;
File "/etc/bind/db.88181.com ";
};

Zone "19.68.10.in-addr. arpa "{
Type master;
File "/etc/bind/db.10.68.19 ";
};

Note: 19.68.10 is the first three segment of the target IP10.68.19.134, indicating an IP address segment.

Add the domain name (88181.com) resolution file/etc/bind/db.88181.com. The content is as follows:

;
; BIND data file for dev sites
;
$ TTL 604800
@ In soa 88181.com. root.88181.com .(
1; Serial
604800; Refresh
86400; Retry
2419200; Expire
604800); Negative Cache TTL
;
@ In ns 88181.com.
@ In a 10.68.19.134
* .88181.com. 14400 in a 10.68.19.134

Add the IP address reverse resolution file/etc/bind/db.10.68.19. The content is as follows:

;
; BIND reverse data file for dev domains
;
$ TTL 604800
@ In soa dev. root. dev .(
1; Serial
604800; Refresh
86400; Retry
2419200; Expire
604800); Negative Cache TTL
;
@ In ns 88181.com.
134 in ptr 88181.com.

3. Restart the BIND9 service.

Service bind9 restart

4. Modify the DNS configuration file for each dns server.

Sudo vi/etc/resolv. conf

Modify nameserver to the IP address of the DNS server configured above

Nameserver 10.68.19.61

This modification will be overwritten every time the server is restarted. You can modify the configuration file.

Sudo vi/etc/resolvconf/resolv. conf. d/base

Add one

Nameserver 10.68.19.61

In this way, the DNS configuration is still valid after the server is restarted.

5. Restart the networking service and refresh the DNS cache.

Sudo service networking restart

After the configuration is complete, run the nslookup command to test the configuration. The result is as follows:

Root @ controller:/etc/bind # nslookup
> Linuxidc.com
Server: 10.68.19.61
Address: 10.68.19.61 #53

Non-authoritative answer:
Name: linuxidc.com
Address: 220.181.111.86
Name: linuxidc.com
Address: 123.125.114.144
Name: linuxidc.com
Address: 220.181.111.85
> 88181.com
Server: 10.68.19.61
Address: 10.68.19.61 #53

Name: 88181.com
Address: 10.68.19.134
> Uaa.88181.com
Server: 10.68.19.61
Address: 10.68.19.61 #53

Name: uaa.88181.com
Address: 10.68.19.134

Domain Name: linuxidc.com. No matching is found in the local DNS. It is resolved through DNS: 8.8.8.8. 88181.com matches in the local DNS and is resolved to 10.68.19.134.

Recommended reading:

RedHat Linux 5 DNS server configuration details http://www.linuxidc.com/Linux/2011-11/48136.htm

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.