Внешняя сетевуха Dlink, через неё шнур идёт на свитч имеет данный мною адрес 192.168.1.100
Этот адрес себе автоматически при старте забирает настроеный мною dhcp-сервер. К этому же свитчу подключается мой adsl-модем с личным адресом 192.168.1.1 Получается, что нужен ещё один адрес уже для dns-сервера. Его я придумал как 192.168.1.4 - думая, что прокатит, но не получилось. Пытался настроить автоматическую расдачу адреса на dns, но дело в том, что dhcp висит на этой же машине и соответственно получить на неё второй адрес не получилось. Вот все мои вновь исправленные файлы и опять не рабочие:
/etc/named.conf
Код: Выделить всё
// (oe) Loosely based on the document below and from production server configurations.
// [url="http://www.cymru.com/Documents/secure-bind-template.html"]http://www.cymru.com/Documents/secure-bind-template.html[/url]
//
// $Id: named.conf 80849 2007-09-06 11:56:48Z oden $
// $HeadURL: svn+ssh://svn.mandriva.com/svn/packages/cooker/bind/current/SOURCES/named.conf $
// secret must be the same as in /etc/rndc.conf
// Access lists (ACL's) should be defined here
include "/etc/bogon_acl.conf";
include "/etc/trusted_networks_acl.conf";
// Define logging channels
include "/etc/logging.conf";
options {
version "";
directory "/var/named";
dump-file "/var/tmp/named_dump.db";
pid-file "/var/run/named.pid";
statistics-file "/var/tmp/named.stats";
zone-statistics yes;
// datasize 256M;
coresize 100M;
// fetch-glue no;
// recursion no;
// recursive-clients 10000;
auth-nxdomain yes;
query-source address * port *;
listen-on port 53 { any; };
cleaning-interval 120;
transfers-in 20;
transfers-per-ns 2;
lame-ttl 0;
max-ncache-ttl 10800;
// forwarders { first_public_nameserver_ip; second_public_nameserver_ip; };
// allow-update { none; };
// allow-transfer { any; };
// Prevent DoS attacks by generating bogus zone transfer
// requests. This will result in slower updates to the
// slave servers (e.g. they will await the poll interval
// before checking for updates).
notify no;
// notify explicit;
// also-notify { secondary_name_server };
// Generate more efficient zone transfers. This will place
// multiple DNS records in a DNS message, instead of one per
// DNS message.
transfer-format many-answers;
// Set the maximum zone transfer time to something more
// reasonable. In this case, we state that any zone transfer
// that takes longer than 60 minutes is unlikely to ever
// complete. WARNING: If you have very large zone files,
// adjust this to fit your requirements.
max-transfer-time-in 60;
// We have no dynamic interfaces, so BIND shouldn't need to
// poll for interface state {UP|DOWN}.
interface-interval 0;
// Uncoment these to enable IPv6 connections support
// IPv4 will still work
// listen-on { none; };
// listen-on-v6 { any; };
allow-query { trusted_networks; };
allow-recursion { trusted_networks; };
// Deny anything from the bogon networks as
// detailed in the "bogon" ACL.
blackhole { bogon; };
};
// workaround stupid stuff... (OE: Wed 17 Sep 2003)
zone "ac" { type delegation-only; };
zone "cc" { type delegation-only; };
zone "com" { type delegation-only; };
zone "cx" { type delegation-only; };
zone "lv" { type delegation-only; };
zone "museum" { type delegation-only; };
zone "net" { type delegation-only; };
zone "nu" { type delegation-only; };
zone "ph" { type delegation-only; };
zone "sh" { type delegation-only; };
zone "tm" { type delegation-only; };
zone "ws" { type delegation-only; };
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "master/localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "master/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "reverse/named.local";
allow-update { none; };
};
[size=4][b][size=3]zone "home.gl.ru" IN {
type master;
file "home.gl.ru.db";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "meho.db";
};[/size][/b][/size]
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.ip6.arpa" IN {
type master;
file "reverse/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "reverse/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "reverse/named.zero";
allow-update { none; };
};
/var/named/home.gl.ru.db
Код: Выделить всё
$TTL 86400
@ IN SOA home.gl.ru.
admin.home.gl.ru. (
2009040300
10800
3600
3600000
86400 )
IN NS home.gl.ru.
IN MX 10 mail.home.cir.tgl.ru.
home.gl.ru. IN A 192.168.1.100
mail IN A 192.168.1.3
kitty IN A 192.168.1.150
localhost IN A 127.0.0.1
modem IN A 192.168.1.1
/var/named/meho.db
Код: Выделить всё
$TTL 86400
@ IN SOA home.gl.ru.
admin.home.gl.ru.
(
2009040300
10800
3600
3600000
86400)
IN NS home.gl.ru.
100 IN PTR home.gl.ru.
150.1.168.192 IN PTR kitty
1.0.0.127 IN PTR localhost
3.1.168.192 IN PTR mail
1.1.168.192 IN PTR modem
/etc/resolv.conf
Код: Выделить всё
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.100
/etc/dhcpd.conf
Код: Выделить всё
ddns-update-style none;
subnet 192.168.1.0 netmask 255.255.255.0 {
# default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name "home.gl.ru";
# Seting up an ip address is better here
option domain-name-servers 192.168.1.100;
#option nis-domain "domain.org";
range dynamic-bootp 192.168.1.100 192.168.1.150;
default-lease-time 60;
max-lease-time 120;
# we want the nameserver to appear at a fixed address
#host ns {
#next-server fixed.mandrakesoft.com;
#hardware ethernet 00:16:EC:DA:6F:DC;
#fixed-address 192.168.1.100;
#}
}
sash-kan писал(а): ↑04.05.2009 22:16
и что выдаёт команда
$ dig @127.0.0.1 home.gl.ru any
?
на той машине, где запущен bind.
p.s. про инкремент serial-а не забываете?
После первого запуска появилось:
; <<>> DiG 9.5.0-P2 <<>> @127.0.0.1 home.gl.ru any
; (1 server found)
;; global options: printcmd
;; connection timed out; no servers could be reached
А когда запустил команду второй раз, то:
; <<>> DiG 9.5.0-P2 <<>> @127.0.0.1 home.gl.ru any
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 55277
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;home.gl.ru. IN ANY
;; Query time: 2650 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue May 5 00:04:59 2009
;; MSG SIZE rcvd: 28
Если честно, то даже не знаю, что такое инкремент serial-a
P.S. Чуть не забыл - результат вывода команды
/sbin/ip add sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 00:17:9a:c2:1d:f7 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth1
inet6 fe80::217:9aff:fec2:1df7/64 scope link
valid_lft forever preferred_lft forever