I’m moreover a Developer than a server admin. But I like to do my stuff in order to be compatible in trying something new in programming and understanding the basic architecture of the development. In Short I try to manage my own cloud VPS, with Ubuntu Server 14.04 LTS / VestaCP  ( recently switched to vestacp from ispconfig3 ) SO I found vestacp cool one.

But while adding my name-servers to the domain on godaddy, I encountered couple of error related to

  • Mismatched NS records
  • DNS servers responded
  • Multiple Nameservers
  • Missing nameservers reported by your nameservers

DNS Error

After some R&D I got to know that my server DNS Zone files aren’t responding to requests about domain hosted on server. Further I found that my server DNS Zone files aren’t writable for this. I got to learn from AskUbuntu forum about this issue. Here’s the Link to the thread. Apparmor Profile needed to be updated so DNS DB files created by VestaCP should be able to write.

We need to add all of our DNS DB Files under /etc/apparmor.d/local/usr.sbin.named with a space and “rw”. we can separate files by comma.

First, we need to Check all available DNS DB files created by VESTACP. We can found that under :

cat /etc/bind/named.conf

The file contents looks like below

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

zone "abc.com" {type master; file "/home/abc/conf/dns/abc.com.db";};
zone "xyz.com" {type master; file "/home/xyz/conf/dns/xyz.com.db";};
zone "example.com" {type master; file "/home/example/conf/dns/example.com.db";};

Now we need to put all these DB files into “/etc/apparmor.d/local/usr.sbin.named” file so now

sudo nano /etc/apparmor.d/local/usr.sbin.named

and add all above files comma seprated your string will look like this

/home/abc/conf/dns/abc.com.db rw, /home/xyz/conf/dns/xyz.com.db rw, /home/example/conf/dns/example.com.db rw,

Now add above line and save the file.

Note: please replace all your DB file in above string.

Next step is to run the apparmor parser to parse updated file

sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.named

Restart Bind

service bind9 restart

Now Test the DNS update
we can do this either via running local command

dig abc.com @

or we can test it via URL

sometimes DNS propogation takes time so please check things in some time if it doesn’t work.

FOr complete Guide on adding Nameservers on Vestacp follow this LINK.

Written by Deepak Oberoi
Deepak Oberoi is a technical blogger.