UbuntuDNS server configuration

Source: Internet
Author: User
Tags nslookup nslookup command
Ubuntu DNS server configuration server IP: 10.68.19.61 Operating system: Ubuntu13.04DNS program: Bind9 test domain name: mycloud.com destination IP: 10.68.19.134 configuration step 1. install the BIND9 package [plain] & lt; spanstyle & quot; font-size: 12px; & quot; & gt Ubuntu DNS server configuration server IP: 10.68.19.61 Operating system: Ubuntu 13.04DNS program: Bind9 test domain name: mycloud.com target IP: 10.68.19.134 configuration step 1. install the BIND9 package [plain] sudo apt-get install bind9 2. add an editing file. edit two files in total and add two new files, as shown below: modify/etc/bind/named. conf. options. remove the forwarders comment. The IP address is the DNS server provided by the network carrier. Here, we use google's DNS [plain] forwarders {8.8.8.8; 8.8.4.4;}; modify/etc/bind/named. conf. add the two-way parsing code: [plain] zone "mycloud.com" {type master; file "/etc/bind/db.mycloud.com" ;}; zone "19.68.10.in-addr. arpa "{type master; file"/etc/bind/db.10.68.19 ";}; note: 19.68.10 indicates the first three paragraphs of the target IP10.68.19.134, indicating a new domain name (mycloud.com) for an IP address segment) parse the/etc/bind/db.mycloud.com file with the following content: [plain]; BIND data file for dev sites; $ TTL 604800 @ in soa mycloud.com. root.mycloud.com. (1; Serial 604800; Refresh 86400; Retry 2419200; Expire 604800); Negative Cache TTL; @ in ns mycloud.com. @ in a 10.68.19.134 * .mycloud.com. 14400 in a 10.68.19.134 the IP address reverse resolution file/etc/bind/db.10.68.19 is added. The content is as follows: [plain]; 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 mycloud.com. 134 in ptr mycloud.com. 3. restart BIND9 service [plain] service bind9 restart 4. modify the DNS configuration file [plain] sudo vi/etc/resolv for each dns server. conf: change nameserver to the IP address of the DNS server configured above [plain] nameserver 10.68.19.61. this modification will be overwritten after each server restart, you can modify the configuration file [plain] sudo vi/etc/resolvconf/resolv. conf. d/base adds a [plain] nameserver 10.68.19.61 in it. after the server is restarted, the DNS configuration is still valid. 5. restart the networking service and refresh the DNS cache [plain] sudo service networking restart. you can run the nslookup command to test the configuration. The result is as follows: [plain] root @ controller: /etc/bind # nslookup> baidu.com Server: 10.68.19.61 Address: Region #53 Non-authoritative answer: Name: baidu.com Address: authorization Name: baidu.com Address: alibaba> mycloud.com Server: 10.68.19.61 Address: 10.68.19.61 #53 Name: mycloud.com Address: Alibaba> Alibaba Server: 10.68.19.61 Address: 10.68.19.61 #53 Name: Alibaba Address: Domain Name: baidu.com. no match is found in the local DNS. it is resolved through DNS: 8.8.8.8. mycloud.com matches in the local DNS and is resolved to 10.68.19.134.
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.