Knowledgebase

Portal Home > Knowledgebase > Articles Database > Is there a file where all DNS zones are stored?


Is there a file where all DNS zones are stored?




Posted by sharmaine1111, 09-24-2009, 10:41 AM
Is there a file where all DNS zones are stored? Like I use cPanel and it has the ability to add/edit/delete zones using WHM. Are these zones stored in a file I can access in SSH?

Posted by winger, 09-24-2009, 10:45 AM
hi, take a look at /var/named dns files are stored there, but one by one

Posted by Rekhatitus, 09-24-2009, 10:45 AM
yes, you can see the zone files under directory /var/named/ if you want to check the zone file for your domain named domain1.com, you can see the zone file under # vi /var/named/domain1.com.db file Last edited by Rekhatitus; 09-24-2009 at 10:54 AM. Reason: add

Posted by Crashus, 09-24-2009, 10:57 AM
Actually they all are stored in /etc/named.conf, list of all zone files which are zones with small extension. Small grep should do the trick

Posted by sharmaine1111, 09-24-2009, 11:23 AM
So I have to check both /var/named & /etc/named.conf?

Posted by Crashus, 09-24-2009, 11:24 AM
Just run this: grep zone /etc/named.conf|awk '{print $2}' Or you can save this to file: grep zone /etc/named.conf|awk '{print $2}' > /var/zones.log

Posted by sharmaine1111, 09-25-2009, 10:56 AM
So what if i need to modify the zones, should i modify both /var/named & /etc/named.conf?

Posted by Crashus, 09-25-2009, 11:28 AM
You should really read some manuals or you will be totally screwed, one wrong symbol in the config and whole named stops working. You need to only modify zone file and change it serial. Maybe it is better to use some control panel like webmin or hire a sysadmin?

Posted by Adam-AEC, 09-25-2009, 02:47 PM
Zone files are in /var/named. Zone files are referenced in /etc/named.conf If you are editing a zone, edit the zone file in /var/named. If you are removing or adding a zone, create the zone file in /var/named and add/remove the zone definition in /etc/named.conf named is very picky when it comes to config and zone file formatting, so if you make any changes by hand, you should ensure they are valid when named re-reads them.

Posted by InstaCarma_Support, 09-26-2009, 06:20 AM
If you just need to modify an existing zone then just make the changes in the corresponding file under /var/named and increase the serial number. You need NOT change anything in the reference file /etc/named.conf unless you are adding/deleting a zone completely.

Posted by 9techs, 09-26-2009, 06:42 AM
etc/named.conf is main configuration file, if you make chages here, it will effect globally and misconfiguration may lead to stop working named service. All zone files are located in /var/named directory. If you are using WHM, then you can do all operations regarding DNS from WHM.

Posted by epadicom, 09-29-2009, 02:41 AM
Anyone have reference the correct configuration of DNS, for example I use the IP address 123.122.12.1



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

Contact us