Pages

Friday, October 4, 2013

Bind Configuration


Bind configuration on plane server
=========================

# yum install bind*  caching-nameserver

# touch /etc/db.cache

# vi /etc/named.conf

options {
    directory "/etc";
    pid-file "/var/run/named/named.pid";
    allow-recursion { localnets; 127.0.0.1; };          
    };

zone "." {
    type hint;
    file "/etc/db.cache";
    };

zone "domain_name" {
        type master;
        file "/var/named/domain_name.db";
        };

allow-recursion { localnets; 127.0.0.1; };  --> This will avoid nameservers performng recursive queries.  You should not have nameservers that allow recursive queries as this will allow almost anyone to use your nameservers and can cause problems.

# vi /var/named/domain_name.db

Add like this :

$ttl 38400
@       IN      SOA     ns1.dmain.com.  support@domain.com (
                        1304230944
                        10800
                        3600
                        604800
                        38400 )
domain.com.         IN      A       192.168.1.100
www.domain.com.     IN      A       192.168.1.100
domain.com.         IN      NS      ns1.domain.com.
domain.com.         IN      NS      ns2.domain.com.
ns1.domain.com.     IN      A       192.168.1.100
ns2.domain.com.     IN      A       192.168.1.100
mail.domain.com.    IN      A       192.168.1.100
domain.com.         IN      MX   10  192.168.1.100

****Don't forget to restart named****

0 comments:

Post a Comment