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