Bulk Update DNS zone files serial

Filed Under (cPanel/WHM, DirectAdmin, Linux) by WebScHoLaR on 11-12-2010

Tagged Under : , , , ,

DNS zone files in Bind are refreshed by increasing the serial number that is in the format yyyymmddXX (e.g 2010121101 i.e 11th December, 2010 and serial number is 01). In case all DNS zone files on the server need to be refreshed by incrementing serial number, this can be done as:

for i in `ls /var/named/*.db` ; do cat $i | sed ‘s/[0-9]\{10\}/2010121101/g’ > $i.new; mv -f $i.new $i; chown named.named $i ;done

This will set serial for all DNS zone files to 2010121101. Make sure to reload BIND after wards as:

[root@System ~]# rndc reload
server reload successful

DNS Concepts

Filed Under (Articles) by WebScHoLaR on 19-02-2008

Tagged Under : , , ,

DNS stands for “Domain Name System” and helps resolving domain names to IP numbers as it is much easier for people to remember logical names rather then a 12 digit number. DNS uses 3 major components”Resolvers (client)”, “Name Servers” and “Domain Name Space”. In basic DNS communication a client (Resolver) sends a query to a Name Server, which returns with the requested information or an address for another Name Server, an error message is received if the query gives no results. Read the rest of this entry »

Proudly Hosted by eServicesProvider