<\/span><\/h2>\nWe are now at the stage we can start adding our zones. First, we add the reverse DNS zones.<\/p>\n
root@service-host:~# cat \/etc\/bind\/db.192\r\n$TTL 604800\r\n@ IN SOA ns.donatolabs.net. root.ns.donatolabs.net. (\r\n 1 ; Serial\r\n 604800 ; Refresh\r\n 86400 ; Retry\r\n 2419200 ; Expire\r\n 604800 ) ; Negative Cache TTL\r\n;\r\n@ IN NS ns.\r\n8 IN PTR vcenter.donatolabs.net.\r\n9 IN PTR nsxmgr.donatolabs.net.<\/pre>\nroot@service-host:~# cat \/etc\/bind\/db.172\r\n$TTL 604800\r\n@ IN SOA ns.donatolabs.net. root.ns.donatolabs.net. (\r\n 2 ; Serial\r\n 604800 ; Refresh\r\n 86400 ; Retry\r\n 2419200 ; Expire\r\n 604800 ) ; Negative Cache TTL\r\n;\r\n@ IN NS ns.\r\n138 IN PTR esx1.donatolabs.net.<\/pre>\n<\/span>Add Forward Zones<\/span><\/h2>\nThe forward zone is next added.<\/p>\n
root@service-host:~# cat \/etc\/bind\/db.donatolabs.net\r\n; BIND data file for local loopback interface\r\n;\r\n$TTL 604800\r\n@ IN SOA ns.donatolabs.net. root.ns.donatolabs.net. (\r\n 2 ; Serial\r\n 604800 ; Refresh\r\n 86400 ; Retry\r\n 2419200 ; Expire\r\n 604800 ) ; Negative Cache TTL\r\n;\r\n@ IN NS ns.donatolabs.net.\r\n@ IN A 172.29.236.139\r\n@ IN AAAA ::1\r\nns IN A 172.29.236.139\r\nesx1 IN A 172.29.236.138\r\nvcenter IN A 192.168.102.8\r\nnsxmgr IN A 192.168.102.9<\/pre>\n<\/span>Restart BIND<\/span><\/h2>\nWe restart BIND, so all of our changes take effect.<\/p>\n
service bind9 restart<\/pre>\n<\/span>Check Zones<\/span><\/h2>\nTo ensure the syntax of our zone files is correct, we run the command\u00a0named-checkzone<\/span>.<\/p>\nnamed-checkzone 236.29.172.in-addr.arpa \/etc\/bind\/zones\/db.172 named-checkzone donatolabs.net db.172.236<\/pre>\n<\/span>Test DNS Lookups<\/span><\/h2>\nAnd finally, to ensure everything is fully we run a series of nslookups.<\/p>\n
\/\/ Reverse DNS lookup<\/pre>\nroot@service-host:~# nslookup 172.29.236.138 172.29.236.139 Server: UnKnown \nAddress: 172.29.236.139 138.236.29.172.in-addr.arpa name = esx1.donatolabs.net.<\/p>\n
\/\/ Forward DNS lookup\r\n root@service-host:~# nslookup esx1.donatolabs.net 172.29.236.139 Server: UnKnown\r\nAddress: 172.29.236.139 Name: esx1.donatolabs.net Address: 172.29.236.138<\/pre>\n\/\/ Test Forwarders\r\nC:\\Users\\donato>nslookup www.fir3net.com 172.29.236.139\r\nServer: UnKnown\r\nAddress: 172.29.236.139\r\nNon-authoritative answer:\r\nName: www.fir3net.com\r\nAddresses: 2a02:e980:16::62\r\n2a02:e980:15::62\r\n199.83.131.98\r\n199.83.129.98\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Introduction Within this article, we will configure a BIND server within Ubuntu. The advantages of having a local DNS server include: Reduced latency to DNS requests\/responses Ability to add private addresses and full flexibility\u00a0of zone\u00a0names. Especially\u00a0useful for VMware installations. It is important to note that the steps provided, are based on a quick setup. Due … Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":3352,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"yoast_head":"\nHow to Configure a BIND Server on Ubuntu - Fir3net<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n\t \n\t \n\t \n