Добрый день. Всех с прошедшими праздниками. Пора и поработать. Впервые устанавливаю на DNS локальную зону. первым делом настроил named.conf, описал зоны
Задание такое: Компьютеры в сети в зоне kc должны быть. Все остальные запросы отправлять в гугловский днс. digi.kc - это там, где днс сервер пытаюсь развернуть. Все остальное взято непонятно откуда. Если что-то надо переделать - то переделаю. Ну и курение мануалов мне мало помогло. может кто другим языком сможет объяснить, почему не так или как надо сделать?
zone "." {
type hint;
<------>file "/etc/bind/db.root";
};
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";
};
zone "digi.kc" {
type slave;
file "/etc/bind/db.kc";
};
zone "153.66.95.in-addr.arpa" {
type slave;
file "/etc/bind/db.rev.kc";
};
include "/etc/bind/named.conf.options";
include "/etc/bind/zones.conf";
named.conf.options
acl mynet {192.168.0.0/24; 127.0.0.1; };
options {
listen-on port 53 { 127.0.0.1;
192.168.0.249;
};
listen-on-v6 port 53 { none; };
directory "/var/named";
....
dump-file "/var/named/data/cache_dump.db";
....
allow-query {127.0.0.1; 192.168.0.0/24;};
....
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursion yes;
allow-recursion {127.0.0.1; 192.168.0.0/24;};
....
forwarders {8.8.8.8;};
....
version "DNS-Server";
dnssec-enable yes;
dnssec-validation yes;
....
bindkeys-file "/etc/bind/named.iscdlv.key";
#managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
файл Зоны кс
$ORIGIN .
$TTL 1h ; minimum TTL (1 hour)
@ IN SOA digi.kc. root.digi.kc. ( 2017010201; serialu
1h ; refresh (1 hour)
10m ; retry (10 minutes)
7d ; expire (1 week)
1h ; minimum TTL (1 hour)
)
IN A 192.168.0.249
;
@ IN NS ns.digi.kc.
@ IN A 192.168.0.249
ns IN A 192.168.0.249
$ORIGIN kc.
database IN A 192.168.0.110
wilo IN A 192.168.0.144
AS10 IN A 192.168.0.149
p IN A 192.168.0.242
file IN A 192.168.0.251
результат тестирования
[root@digi bind]# nslookup gitlab8.kc 192.168.0.249
Server: 192.168.0.249
Address: 192.168.0.249#53
** server can't find gitlab8.kc: NXDOMAIN
Открываю логи
received control channel command 'reload'
loading configuration from '/etc/named.conf'
reading built-in trusted keys from file '/etc/named.iscdlv.key'
initializing GeoIP Country (IPv4) (type 1) DB
GEO-106FREE 20130219 Build 1 Copyright (c) 2012 MaxMind Inc All Rights Reserved
GeoIP Country (IPv6) (type 12) DB not available
GeoIP City (IPv4) (type 2) DB not available
GeoIP City (IPv4) (type 6) DB not available
GeoIP City (IPv6) (type 30) DB not available
GeoIP City (IPv6) (type 31) DB not available
GeoIP Region (type 3) DB not available
GeoIP Region (type 7) DB not available
GeoIP ISP (type 4) DB not available
GeoIP Org (type 5) DB not available
GeoIP AS (type 9) DB not available
GeoIP Domain (type 11) DB not available
GeoIP NetSpeed (type 10) DB not available
using default UDP/IPv4 port range: [1024, 65535]
using default UDP/IPv6 port range: [1024, 65535]
sizing zone task pool based on 6 zones
automatic empty zone: 10.IN-ADDR.ARPA
automatic empty zone: 16.172.IN-ADDR.ARPA
automatic empty zone: 17.172.IN-ADDR.ARPA
automatic empty zone: 18.172.IN-ADDR.ARPA
automatic empty zone: 19.172.IN-ADDR.ARPA
automatic empty zone: 20.172.IN-ADDR.ARPA
automatic empty zone: 21.172.IN-ADDR.ARPA
automatic empty zone: 22.172.IN-ADDR.ARPA
automatic empty zone: 23.172.IN-ADDR.ARPA
automatic empty zone: 24.172.IN-ADDR.ARPA
automatic empty zone: 25.172.IN-ADDR.ARPA
automatic empty zone: 26.172.IN-ADDR.ARPA
automatic empty zone: 27.172.IN-ADDR.ARPA
automatic empty zone: 28.172.IN-ADDR.ARPA
automatic empty zone: 29.172.IN-ADDR.ARPA
automatic empty zone: 30.172.IN-ADDR.ARPA
automatic empty zone: 31.172.IN-ADDR.ARPA
automatic empty zone: 168.192.IN-ADDR.ARPA
automatic empty zone: 64.100.IN-ADDR.ARPA
automatic empty zone: 65.100.IN-ADDR.ARPA
automatic empty zone: 66.100.IN-ADDR.ARPA
automatic empty zone: 67.100.IN-ADDR.ARPA
automatic empty zone: 68.100.IN-ADDR.ARPA
automatic empty zone: 69.100.IN-ADDR.ARPA
automatic empty zone: 70.100.IN-ADDR.ARPA
automatic empty zone: 71.100.IN-ADDR.ARPA
automatic empty zone: 72.100.IN-ADDR.ARPA
automatic empty zone: 73.100.IN-ADDR.ARPA
automatic empty zone: 74.100.IN-ADDR.ARPA
automatic empty zone: 75.100.IN-ADDR.ARPA
automatic empty zone: 76.100.IN-ADDR.ARPA
automatic empty zone: 77.100.IN-ADDR.ARPA
automatic empty zone: 78.100.IN-ADDR.ARPA
automatic empty zone: 79.100.IN-ADDR.ARPA
automatic empty zone: 80.100.IN-ADDR.ARPA
automatic empty zone: 81.100.IN-ADDR.ARPA
automatic empty zone: 82.100.IN-ADDR.ARPA
automatic empty zone: 83.100.IN-ADDR.ARPA
automatic empty zone: 84.100.IN-ADDR.ARPA
automatic empty zone: 85.100.IN-ADDR.ARPA
automatic empty zone: 86.100.IN-ADDR.ARPA
automatic empty zone: 87.100.IN-ADDR.ARPA
automatic empty zone: 88.100.IN-ADDR.ARPA
automatic empty zone: 89.100.IN-ADDR.ARPA
automatic empty zone: 90.100.IN-ADDR.ARPA
automatic empty zone: 91.100.IN-ADDR.ARPA
automatic empty zone: 92.100.IN-ADDR.ARPA
automatic empty zone: 93.100.IN-ADDR.ARPA
automatic empty zone: 94.100.IN-ADDR.ARPA
automatic empty zone: 95.100.IN-ADDR.ARPA
automatic empty zone: 96.100.IN-ADDR.ARPA
automatic empty zone: 97.100.IN-ADDR.ARPA
automatic empty zone: 98.100.IN-ADDR.ARPA
automatic empty zone: 99.100.IN-ADDR.ARPA
automatic empty zone: 100.100.IN-ADDR.ARPA
automatic empty zone: 101.100.IN-ADDR.ARPA
automatic empty zone: 102.100.IN-ADDR.ARPA
automatic empty zone: 103.100.IN-ADDR.ARPA
automatic empty zone: 104.100.IN-ADDR.ARPA
automatic empty zone: 105.100.IN-ADDR.ARPA
automatic empty zone: 106.100.IN-ADDR.ARPA
automatic empty zone: 107.100.IN-ADDR.ARPA
automatic empty zone: 108.100.IN-ADDR.ARPA
automatic empty zone: 109.100.IN-ADDR.ARPA
automatic empty zone: 110.100.IN-ADDR.ARPA
automatic empty zone: 111.100.IN-ADDR.ARPA
automatic empty zone: 112.100.IN-ADDR.ARPA
automatic empty zone: 113.100.IN-ADDR.ARPA
automatic empty zone: 114.100.IN-ADDR.ARPA
automatic empty zone: 115.100.IN-ADDR.ARPA
automatic empty zone: 116.100.IN-ADDR.ARPA
automatic empty zone: 117.100.IN-ADDR.ARPA
automatic empty zone: 118.100.IN-ADDR.ARPA
automatic empty zone: 119.100.IN-ADDR.ARPA
automatic empty zone: 120.100.IN-ADDR.ARPA
automatic empty zone: 121.100.IN-ADDR.ARPA
automatic empty zone: 122.100.IN-ADDR.ARPA
automatic empty zone: 123.100.IN-ADDR.ARPA
automatic empty zone: 124.100.IN-ADDR.ARPA
automatic empty zone: 125.100.IN-ADDR.ARPA
automatic empty zone: 126.100.IN-ADDR.ARPA
automatic empty zone: 127.100.IN-ADDR.ARPA
automatic empty zone: 127.IN-ADDR.ARPA
automatic empty zone: 254.169.IN-ADDR.ARPA
automatic empty zone: 2.0.192.IN-ADDR.ARPA
automatic empty zone: 100.51.198.IN-ADDR.ARPA
automatic empty zone: 113.0.203.IN-ADDR.ARPA
automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
automatic empty zone: 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.0.IP6.ARPA
automatic empty zone: D.F.IP6.ARPA
automatic empty zone: 8.E.F.IP6.ARPA
automatic empty zone: 9.E.F.IP6.ARPA
automatic empty zone: A.E.F.IP6.ARPA
automatic empty zone: B.E.F.IP6.ARPA
automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
reloading configuration succeeded
reloading zones succeeded
all zones loaded
running
при запуске named появляется
[root@digi bind]# systemctl start named.service
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.
[root@digi bind]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Пн 2017-01-02 13:23:42 MSK; 1s ago
Process: 32174 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 32045 ExecReload=/bin/sh -c /usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 31598 ExecStart=/usr/sbin/named -u named $OPTIONS (code=exited, status=0/SUCCESS)
Process: 32521 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z /etc/bind/named.conf; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)
Main PID: 31601 (code=exited, status=0/SUCCESS)
янв 02 13:23:42 digi.kc bash[32521]: zone kc/IN: has 0 SOA records
янв 02 13:23:42 digi.kc bash[32521]: zone kc/IN: has no NS records
янв 02 13:23:42 digi.kc bash[32521]: zone kc/IN: not loaded due to errors.
янв 02 13:23:42 digi.kc bash[32521]: _default/kc/IN: bad zone
янв 02 13:23:42 digi.kc bash[32521]: zone yes.kc/IN: loaded serial 2017010101
янв 02 13:23:42 digi.kc bash[32521]: zone 0.168.192.in-addr.arpa/IN: loaded serial 2017010101
янв 02 13:23:42 digi.kc systemd[1]: named.service: control process exited, code=exited status=1
янв 02 13:23:42 digi.kc systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
янв 02 13:23:42 digi.kc systemd[1]: Unit named.service entered failed state.
янв 02 13:23:42 digi.kc systemd[1]: named.service failed.
Помогите разобраться в проблеме пожалуйста.