Centos 7 bağlama sorunu


0

Centos 7'de bir dns sunucusu yapılandırmaya çalışıyorum. Dns sunucuları kurma hakkında daha önce bir bilgim yok, bu dersi takip ediyorum: http://www.itzgeek.com/how-tos/linux/centos-how- tos / configure-dns-bağlayıcı-sunucu-on-centos-7-rhel-7.html Ne yazık ki, bu hatayı alıyorum:

named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; disabled)
   Active: failed (Result: exit-code) since Sun 2015-12-06 19:34:07 EET; 
4min 5s ago
  Process: 9171 ExecStartPre=/usr/sbin/named-checkconf -z /etc/named.conf (code=exited, status=1/FAILURE)
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: dns_rdata_fromtext: fwd.dynavio.coop.db:12: near '192.168.38.301': bad dotted quad
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone dynavio.coop/IN: loading from master file fwd.dynavio.coop.db failed: bad dotted quad
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone dynavio.coop/IN: not loaded due to errors.
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: _default/dynavio.coop/IN: bad dotted quad
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone 38.168.192.in-addr.arpa/IN: loaded serial 2014112511
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone localhost.localdomain/IN: loaded serial 0
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone localhost/IN: loaded serial 0
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: zone 0.in-addr.arpa/IN: loaded serial 0
Dec 06 19:34:07 localhost.localdomain systemd[1]: named.service: control process exited, code=exited status=1
Dec 06 19:34:07 localhost.localdomain systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Dec 06 19:34:07 localhost.localdomain systemd[1]: Unit named.service entered failed state.

named.conf dosyası:

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        listen-on port 53 { 127.0.0.1;192.168.38.103; };
        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; 192.168.38.0/24; };

        /*
         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
         - If you are building a RECURSIVE (caching) DNS server, you need to enable
           recursion.
         - If your recursive DNS server has a public IP address, you MUST enable access
           control to limit queries to your legitimate users. Failing to do so will
           cause your server to become part of large scale DNS amplification
           attacks. Implementing BCP38 within your network would greatly
           reduce such attack surface
        */
        recursion yes;

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

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

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};

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

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

zone "dynavio.coop" IN {
        type master;
        file "fwd.dynavio.coop.db";
        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

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

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
};

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

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

zone "dynavio.coop" IN {
        type master;
        file "fwd.dynavio.coop.db";
        allow-update { none; };
};

zone "38.168.192.in-addr.arpa" IN {
        type master;
        file "38.168.192.db";
        allow-update { none; };
};

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

fwd.dynavio.coop.db dosyası:

$TTL 86400
@   IN  SOA         primary.dynavio.coop. root.dynavio.coop. (
2014112511      ;Serial
3600            ;Refresh
1800            ;Retry
604800          ;Expire
86400           ;Minimum TTL
)
;Name Server Information
@      IN NS      primary.dynavio.coop.
;IP Address of Name Server
primary IN  A      192.168.38.301
;Mail exchanger
dynavio.coop.  IN  MX 10   mail.dynavio.coop.
;A - Record HostName To Ip Address
www     IN  A       192.168.38.100
mail    IN  A       192.168.38.150
;CNAME record
ftp     IN CNAME        www.dynavio.coop.

38.168.192.db dosyası:

$TTL 86400
@   IN  SOA         primary.dynavio.coop. root.dynavio.coop. (
2014112511      ;Serial
3600            ;Refresh
1800            ;Retry
604800          ;Expire
86400           ;Minimum TTL
)
;Name Server Information
@ IN  NS      primary.dynavio.coop.
;Reverse lookup for Name Server
8       IN   PTR     primary.dynavio.coop.
;PTR Record IP address to HostName
100     IN   PTR     www.dynavio.coop.
150     IN   PTR     mail.dynavio.coop.

Yanıtlar:


1

Bölge yapılandırmanızda birkaç hata var. En büyüğü yanlış IP adresidir primary IN A 192.168.38.301Geçerli bir IP sadece 255'e kadar izin verir.

Bölgenizi test sunucularımdan birine yerleştirdim ve hatalar giderildikten sonra yüklendi (IP’yi .8 (rev-zone'unuza göre) olarak değiştirdim. adlandırmaya başlamak için. Dec 06 19:34:07 localhost.localdomain named-checkconf[9171]: dns_rdata_fromtext: fwd.dynavio.coop.db:12: near '192.168.38.301': bad dotted quad

İşte bind-9.8 üzerinde test edilmiş bir çalışma bölgesi dosyası;

; dynavio.coop Forward Zone

$TTL 86400
$ORIGIN coop.
dynavio         IN      SOA     primary.dynavio.coop. root.dynavio.coop. (
                        2015120601      ; Serial
                        3600    ; Refresh
                        1800    ; Retry
                        604800  ; Expire
                        86400 ) ; Minimum

                IN      NS      primary.dynavio.coop.
                IN      MX   10 mail.dynavio.coop.
                IN      TXT     "v=spf1 mx ip4:192.168.38.0/24 -all"

$ORIGIN dynavio.coop.

primary         IN      A       192.168.38.8
www             IN      A       192.168.38.100
mail            IN      A       192.168.38.150
ftp             IN      CNAME   www.dynavio.coop.

Harika, ama bir şey var. Yayınlanmış ters bölgesinden "birincil" için 192.168.38.8 adresini kastettiğini görüyorum.
Nikita Kipriyanov

:-) cevabımı güncelledi, teşekkürler @ NikitaKipriyanov Sadece problemi olan ileri bölgeye bakarken bunu fark etmedim.
user3788685
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.