Install and configure Ubuntu DNS

Source: Internet
Author: User

Ubuntu DNS installation and configuration install sudo apt-get install bind9 Modify/etc/bind/named. conf. local sudo vi/etc/bind/named. conf. add the following content to the local file (replace domainname with the desired domainname), zone "domainname.com" {type master; file "/etc/bind/zones/domainname.com. db ";}; zone" 0.168.192.in-addr. arpa "{type master; file"/etc/bind/zones/rev.0.168.192.in-addr. arpa ";}; then edit the file/etc/bind/named. conf. options, sudo vi/etc/bind/named. conf. options Add the following content to it: forwarders {# Replace the address below with the address of your provider's DNS server 180.168.20.118 ;}; now let's create the zone definition file sudo mkdir/etc/bind/zonessudo vi/etc/bind/zones/domainname.com.dbdomainname.com. in soa dns.domainname.com. admin.domainname.com. (200608140128800360060480038400) domainname.com. in ns dns.domainname.com.domainname.com. in mx 10 mta.domainname.com. dns in a 192.168.0.104 mta in a 192.168.0.20.nfs in a 192.168.0.105master in a 192.168.0.102 next create reverse resolution file (Domain Name resolved from IP) sudo vi/etc/bind/zones/rev.0.168.192.in-addr. IN arpa, enter $ TTL 86400 @ in soa dns.domainname.com. admin.domainname.com. (1997022700; Serial28800; Refresh14400; Retry3600000; Expire86400); Minimum in ns dns.domainname.com. 104 in ptr dns.domainname.com. 105 in ptr nfs.domainname.com. 102 in ptr master.domainname.com. modify/etc/resolv. conf sudo vi/etc/resolv. enter search domainname in conf. comnameserver 192.168.0.104 Note: The above changes will be overwritten after the machine is restarted. If the changes continue to take effect after the machine is restarted, you must go to the/etc/resolvconf/resolv file. conf. enter the above content in d/base to test your configuration, dig example. comhost dnshost 192.168.0.102

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.