Example DNS Zone File for BIND9

Valic —  August 18, 2011 — 2 Comments

Sample DNS zone file for BIND9 with a domain with two nameservers  ns1.example.com and ns2.example.com.

You can use this example to define your own name servers.Just make changes to the domain name and IP addresses.

Be sure to include first the following statement in named.conf:

zone "debian-tutorials.com" {
type master;
file "

The zone file looks like this:

$ORIGIN debian-tutorials.com.
@    IN    SOA    debian-tutorials.com.   contact@debian-tutorials.com. (
86400 )
Continue Reading…

Smbind is a PHP-based tool for managing DNS zones for BIND via the web. Supports per-user administration of zones, error checking, and a PEAR DB database backend.


apt-get update && apt-get install smbind

After install:

1. Firts you need to add the user that runs your web server (default in debian is www-data) to the group that runs the BIND server (default in debian is bind), for example:

usermod -G bind www-data

2.Restart your webserver:

/etc/init.d/apache2 restart

Continue Reading…

inadyn is a C based client used to update DNS entries. Inadyn is an IP update client for DynDNS.com, no-ip.com , etc.

Why we need this? Well you don’t really need this if you are using static IP.

But if you have dynamic IP, you must keep your IP updated with the domain you choose in DynDNS.com or no-ip.com  every time you restart the router. Otherwise, the visitors can’t reach to your server.


apt-get update && apt-get install inadyn

or you can download inadyn:

cd /usr/src

wget http://cdn.dyndns.com/inadyn.zip

unzip inadyn.zip

cp inadyn/bin/linux/inadyn /usr/bin/inadyn

Change the file permission:

chmod 755 /usr/bin/inadyn

Configuration file for inadyn:

Continue Reading…

After I needed a DNS server DNS server, I decided the best idea would probably be to write this howto myself…. So, here it is:

Step 1. Install bind9:

apt-get install bind9

Step 2: Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file
named.conf. However, Debian provides you with a pre-configured Bind, so we will edit another file:

vim /etc/bind/named.conf.local

Continue Reading…