named - простая установка и настройка

Выполним установку

yum install bind-chroot bind-utils


Настройка

Скопируем сэмпл-файлы в конфигурационный каталог

cp -rp /usr/share/doc/bind-9.3.6/sample/etc/* /var/named/chroot/etc/

Скопируем сэмпл-файлы (описания зон) в каталог

cp -rp /usr/share/doc/bind-9.3.6/sample/var/named/* /var/named/chroot/var/named/

/var/named/chroot/etc/named.conf

options
{
        directory "/var/named";
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";
   
        forward first;
        forwarders      {
                77.106.109.139;
                77.106.108.139;
        };
   
        version "no version info";
   
};

view "localhost_resolver"
{
        match-clients           { localhost; };
        match-destinations      { localhost; };
        recursion yes;
        # all views must contain the root hints zone:
        include "/etc/named.root.hints";

        /* these are zones that contain definitions for all the localhost
         * names and addresses, as recommended in RFC1912 - these names should
         * ONLY be served to localhost clients:
         */
        include "/etc/named.rfc1912.zones";
};

view    "external"
{
        match-clients           { any; };
        match-destinations      { any; };

        recursion no;

        // Disable lookups for any cached data and root hints
        allow-query-cache { none; };

        // all views must contain the root hints zone:
        include "/etc/named.root.hints";

        // These are your "authoritative" external zones, and would probably
        // contain entries for just your web and mail servers:
   
        zone "xtreme.tomsk.ru" {
                type master;
                file "xtreme.tomsk.ru.conf";
        };
};

/var/named/chroot/var/named/xtreme.tomsk.ru.conf

$TTL    3600
@       IN      SOA     ns.xtreme.tomsk.ru. root.xtreme.tomsk.ru.  (
                                      2010021600 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
@       IN      NS      ns.xtreme.tomsk.ru.
@       IN      A       62.68.143.130
www     IN      CNAME   @

/etc/resolv.conf

nameserver localhost


Запустим службу и пропишем в автозапуск

service named start
chkconfig --level 3 named on


Ссылки

 
blog/2011/11/18-named_-_простая_установка_и_настройка.txt · Последние изменения: 2011/11/18 15:54 — Антон Бугреев · []