Rabu, 21 November 2012

HOW TO SETUP DNS ON CENTOS

following the setup guide below

http://www.howtoforge.com/perfect-se...64-ispconfig-3

running centos 5.5, 64bit

changes to the DNS server via ispconfig were not being reflected.

the results of "service named status" was always "number of zones: 0" and no dns requests were being resloved locally or externally.

i edited the file: /var/named/chroot/etc/named.conf

i added the line below to the end


Code:
include "/var/named/chroot/var/named/named.local";
this solved my problem of no changes being reflected.

to get bind listening to resolve outside DNS requests i did the following.

edited /var/named/chroot/etc/named.conf and changed

listen-on port 53 { 127.0.0.1; };

to

Code:
listen-on port 53 { 127.0.0.1; my.ip.address; };
and i commented out the line below to allow requests from any IP

Code:
//allow-query     { 127.0.0.1; };
just thought i'd post this in case anyone else is having this issue.

by this way you are providing a free dns to the internet
and maybe you are vulnerable to attacks


my way of doing it :
at my ispconfig web-interface i have setup my
System -> Server config -> DNS
like this



and my named.conf
Code:
[root@srv ~]# cat /var/named/chroot/etc/named.conf
options {
        listen-on port 53 { 127.0.0.1; 10.10.10.10; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named/chroot/var/named";
        dump-file       "/var/named/chroot/var/named/data/cache_dump.db";
        statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};


view "localhost"
{
        match-clients           { localhost; };
        match-destinations      { localhost; };
        recursion yes;
        allow-query     { 127.0.0.1; };

      zone "." IN {
              type hint;
              file "named.root";
      };
include "/var/named/chroot/etc/named.conf.local";
};


view    "external"
{
        match-clients           { any; };
        match-destinations      { any; };
        recursion no;
        allow-query-cache { none; };

      zone "." IN {
              type hint;
              file "named.root";
      };
include "/var/named/chroot/etc/named.conf.local";
};
Reply With Quote

0 komentar:

Posting Komentar