Thursday, February 2, 2012

Sample BIND config

/etc/named.conf

 options {
    listen-on port 53 { 127.0.0.1; 192.168.122.140; };
    listen-on-v6 port 53 { ::1; };
    directory     "/var/named";
    dump-file     "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { localhost; };
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
    type hint;
    file "named.ca";
};

zone "penoycentral.net" {
    type master;
    file "penoycentral.net.zone";
    };

zone "122.168.192.in-addr.arpa" IN {
    type master;
    file "192.168.122.zone";
};

include "/etc/named.rfc1912.zones";


/var/named/penoycentral.net.zone

 $TTL 1D
penoycentral.net. IN SOA centos01.penoycentral.net. root.penoycentral.net (
04 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@    IN NS centos01
centos01 IN A 192.168.122.140
centos02 IN A 192.168.122.8
rhel01 IN A 192.168.122.122
rhel02 IN A 192.168.122.120

/var/named/192.168.122.zone
 $TTL 1D
@ IN SOA centos01.penoycentral.net. root.penoycentral.net (
2012020202 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
    IN NS    centos01.penoycentral.net.
140    IN PTR    centos01.penoycentral.net.
8    IN PTR    centos02.penoycentral.net.
 To check zone config
named-checkzone penoycentral.net penoycentral.net.zone
named-checkzone penoycentral.net 192.168.122.zone
named-checkconf /etc/named.conf

1 comment:

  1. Hi,
    I have created a new blog about RHCSA and RHCE certification exam.
    http://linuxsuperuser07.blogspot.in

    This blog is all about Linux system administration and help people to find answers to there system administration related questions.

    ReplyDelete