Не удается настроить локальный DNS-сервер на Slackware

565
Stefan Borović

Я хочу настроить bind (v9) на Slackware (v14.2), чтобы example.com разрешал IP-адрес локального сервера Apache.

Это мой /etc/resolv.conf:

# Generated by dhcpcd from eth0.dhcp # /etc/resolv.conf.head can replace this line nameserver 192.168.0.1 # /etc/resolv.conf.tail can replace this line 

/etc/named.conf:

options { directory "/var/named"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; };  //  // a caching only nameserver config //  zone "." IN { type hint; file "caching-example/named.root"; };  zone "localhost" IN { type master; file "caching-example/localhost.zone"; allow-update { none; }; };  zone "0.0.127.in-addr.arpa" IN { type master; file "caching-example/named.local"; allow-update { none; }; };  zone "example.com"{ type master; file "/var/named/example.com.hosts"; notify yes; }; 

/var/named/example.com.hosts:

$TTL 3600 example.com. IN SOA sb.slackintosh.com. hostmaster.slackintosh.com. ( 2002121607 3600 7200 1209600 7200 )  IN A 192.168.0.1 IN NS sb.slaskintosh.com. IN MX 5 mail.example.com.  mail IN A 192.168.0.1 www IN A 192.168.0.1 

Тем не менее, после перезапуска bind, example.com не разрешается:

bash-4.3# nslookup example.com Server: 192.168.0.1  Address: 192.168.0.1#53    ** server can`t find example.com: NXDOMAIN  

Что я сделал не так? Заранее спасибо!

РЕДАКТИРОВАТЬ: я запустил named-checkzone, и это вывод:

bash-4.3# named-checkzone localhost /var/named/itlink.edu.hosts  /var/named/itlink.edu.hosts:5: ignoring out-of-zone data (itlink.edu) zone localhost/IN: has 0 SOA records zone localhost/IN: has no NS records zone localhost/IN: not loaded due to errors. 
1
Точно так же, как FYI, заменяющий каталог и IP, ваш файл хоста и запись .conf были загружены для меня локально ... так что формат, похоже, не является проблемой. Anaksunaman 6 лет назад 0
Что дает `nslookup www.example.com`? или `nslookup mail.example.com`? Ljm Dullaart 6 лет назад 0

0 ответов на вопрос

Похожие вопросы