[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Настройка dns





2008/1/11, Alexey Pechnikov <pechnikov@sandy.ru>:

Зачем вы конфиг по умолчанию сломали? В файл /etc/bind/named.conf дописываем
строку:

include "/etc/bind/zones.masters.conf";

В файл /etc/bind/zones.masters.conf пишем:

zone " mobigroup.ru" {
        type master;
        file "/var/cache/bind/mobigroup.ru";
};

В файл /var/cache/bind/mobigroup.ru пишем:


@                       IN  SOA ns.mobigroup.ru.  support.mobigroup.ru. (
                            2008010201              ; serial number
                            900          ; refresh
                            600          ; retry
                            6400        ; expire
                            3600       ) ; default TTL

@                       MX     10     mail.mobigroup.ru.

;
;  Zone NS records
;

@                       IN      NS  ns.mobigroup.ru.
@                      IN      NS  ns0.xname.org.
@                      IN      NS   ns1.xname.org.

;
;  Zone records
;

mail.mobigroup.ru.   A             89.108.85.55
@                               IN A   213.148.6.78
www.mobigroup.ru.               IN A   213.148.6.78
ns.mobigroup.ru .                IN A   213.148.6.77


И все работает. Это не самый оптимальный вариант, но начинать можно с него.


Поставил bind9. Конфиг по умолчанию не ломал, а немного исправил:

/etc/bind/named.conf

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind/README.Debian for information on the
// structure of BIND configuration files in Debian for BIND versions 8.2.1
// and later, *BEFORE* you customize this configuration file.
//

include "/etc/bind/named.conf.options";

// reduce log verbosity on issues outside our control
logging {
        category update {
                default_syslog;
                };
        category default {
                default_syslog;
                };
        category lame-servers {
                default_syslog;
                };
        category CNAME {
                default_syslog;
                };
        category notify {
                default_syslog;
                };
        category general {
                default_syslog;
                };
};

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

// add local zone definitions here
include "/etc/bind/named.conf.local";
};
### end #########################

### /etc/bind/named.conf.local ######

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "kaztransnet.kz" {
     type master;
     file "/etc/bind/domain.kz";
//   allow-update { none;};
     allow-query { any;};
//   allow-transfer { 195.24.128.164; } ;
notify yes;
  };
### end ############################

### /etc/bind/domain.kz ######################
TTL 14440
@       IN      SOA     kaztransnet.kz. root.kaztransnet.kz . (
                               2008012800   7200  3600  604800 86400 )
                    NS       kaztransnet.kz.
                    MX      10 kaztransnet.kz.
                    TXT     "KazTransNet"
localhost       A       127.0.0.1
www.kaztransnet.kz. A       82.211.185.1
kaztransnet.kz.     A       82.211.185.1
ns.kaztransnet.kz.  A       82.211.185.1
kaztransnet.kz      IN NS   ns1.twisted4life.com.

### end ##############################
-- 
---------------------------
Best Regards
Kharlamov Sergey

Reply to: