Код: Выделить всё
* A 1.2.3.4
@ A 1.2.3.4
www A 1.2.3.4
Код: Выделить всё
(часть конфига про зоны)
IN NS ns1.reg.ru.
IN NS ns2.reg.ru.
@ IN A 1.2.3.4
www IN A 1.2.3.4
ftp IN A 1.2.3.4
www2 IN A 5.6.7.8
Код: Выделить всё
(на сервере который держит)
> nslookup www2.domen.ru
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: www2.domen.ru
Address: 5.6.7.8
Код: Выделить всё
(на любом другом компе который не знает этого днс)
> nslookup www2.domen.ru
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: www2.domen.ru
Address: 1.2.3.4
Код: Выделить всё
(мастер)
# named.conf
key slave {
algorithm hmac-md5;
secret "transfer-secret-key";
};
logging {
channel syslog {
syslog daemon;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
category xfer-in { syslog; };
category xfer-out { syslog; };
category config { syslog; };
category default { null; };
};
options {
directory "/etc/namedb";
pid-file "/var/run/named.pid";
dump-file "/var/tmp/named_dump.db";
statistics-file "/var/tmp/named.stats";
version "UNKNOWN";
listen-on {
127.0.0.1;
1.2.3.4;
};
};
key "rndc-key" {
algorithm hmac-md5;
secret "rndc-secret-key";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
zone "." {
type hint;
file "named.root";
};
zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "master/localhost.rev";
};
zone "3.2.1.in-addr.arpa" {
type master;
file "master/1.2.3.4.rev";
allow-transfer { key slave; };
};
zone "domen.ru" {
type master;
file "master/domen.ru";
allow-transfer { key slave; };
};
==================================================
# domen.ru
$TTL 3600 ; 1 hour
@ IN SOA ns1.domen.ru. info.domen.ru. (
2010032903 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
3600 ; minimum (1 hour)
)
IN NS ns1.domen.ru.
IN NS ns2.domen.ru.
@ IN A 1.2.3.4
www IN A 1.2.3.4
ftp IN A 1.2.3.4
gw IN A 1.2.3.4
ns1 IN A 1.2.3.4
ns2 IN A 5.6.7.8
www2 IN A 5.6.7.8
===================================================
# 1.2.3.4.rev
$TTL 3600 ; 1 hour
@ IN SOA ns1.domen.ru. info.domen.ru. (
2010032904 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS ns1.domen.ru.
NS ns2.domen.ru.
4 PTR ns1.domen.ru.
Код: Выделить всё
(слэйв)
logging {
channel syslog {
syslog daemon;
severity info;
print-category yes;
print-severity yes;
};
category xfer-in { syslog; };
category xfer-out { syslog; };
category config { syslog; };
category default { null; };
};
options {
directory "/etc/namedb";
pid-file "/var/run/named.pid";
dump-file "/var/tmp/named_dump.db";
statistics-file "/var/tmp/named.stats";
version "UNKNOWN";
listen-on {
127.0.0.1;
5.6.7.8;
};
};
zone "." {
type hint;
file "named.root";
};
zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "master/1.0.0.127.rev";
allow-transfer { 127.0.0.1; };
};
key slave {
algorithm hmac-md5;
secret "transfer-secret-key";
};
server 1.2.3.4 { keys slave; };
zone "domen.ru" {
type slave;
masters { 1.2.3.4; };
file "slave/bak.domen.ru";
allow-transfer { none; };
};
zone "3.2.1.in-addr.arpa" {
type slave;
masters { 1.2.3.4; };
file "slave/bak.1.2.3.4.rev";
allow-transfer { none; };
};
Мастер сервер:
Код: Выделить всё
Mar 29 11:16:17 gw named[3643]: starting BIND 9.7.0-P1 -u bind -t /var/named -u bind
Mar 29 11:16:17 gw named[3643]: found 2 CPUs, using 2 worker threads
Mar 29 11:16:17 gw named[3643]: using up to 4096 sockets
Mar 29 11:16:17 gw named[3643]: loading configuration from '/etc/namedb/named.conf'
Mar 29 11:16:17 gw named[3643]: using default UDP/IPv4 port range: [49152, 65535]
Mar 29 11:16:17 gw named[3643]: using default UDP/IPv6 port range: [49152, 65535]
Mar 29 11:16:17 gw named[3643]: no IPv6 interfaces found
Mar 29 11:16:17 gw named[3643]: listening on IPv4 interface rl0, 1.2.3.4#53
Mar 29 11:16:17 gw named[3643]: listening on IPv4 interface lo0, 127.0.0.1#53
Mar 29 11:16:17 gw named[3643]: generating session key for dynamic DNS
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 0.IN-ADDR.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 127.IN-ADDR.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 254.169.IN-ADDR.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Mar 29 11:16:17 gw named[3643]: 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
Mar 29 11:16:17 gw named[3643]: automatic empty 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
Mar 29 11:16:17 gw named[3643]: automatic empty zone: D.F.IP6.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 8.E.F.IP6.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: 9.E.F.IP6.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: A.E.F.IP6.ARPA
Mar 29 11:16:17 gw named[3643]: automatic empty zone: B.E.F.IP6.ARPA
Mar 29 11:16:17 gw named[3643]: command channel listening on 127.0.0.1#953
Mar 29 11:16:17 gw named[3643]: 29-Mar-2010 11:16:17.668 xfer-out: info: client 5.6.7.8#57787: transfer of 'domen.ru/IN': AXFR-style IXFR
started: TSIG transfer-secret-key
Mar 29 11:16:17 gw named[3643]: 29-Mar-2010 11:16:17.669 xfer-out: info: client 5.6.7.8#57787: transfer of 'domen/IN': AXFR-style IXFR ended
Mar 29 11:16:18 gw named[3643]: 29-Mar-2010 11:16:18.169 xfer-out: info: client 5.6.7.8#65158: transfer of '3.2.1.in-addr.arpa/IN':
AXFR-style IXFR started: TSIG transfer-secret-key
Mar 29 11:16:18 gw named[3643]: 29-Mar-2010 11:16:18.169 xfer-out: info: client 5.6.7.8#65158: transfer of '3.2.1.in-addr.arpa/IN':
AXFR-style IXFR ended
Код: Выделить всё
Mar 29 11:16:45 ns2 named[25422]: starting BIND 9.7.0-P1 -t /var/named -u bind
Mar 29 11:16:45 ns2 named[25422]: using up to 4096 sockets
Mar 29 11:16:45 ns2 named[25422]: loading configuration from '/etc/namedb/named.conf'
Mar 29 11:16:45 ns2 named[25422]: using default UDP/IPv4 port range: [49152, 65535]
Mar 29 11:16:45 ns2 named[25422]: using default UDP/IPv6 port range: [49152, 65535]
Mar 29 11:16:45 ns2 named[25422]: no IPv6 interfaces found
Mar 29 11:16:45 ns2 named[25422]: listening on IPv4 interface rl0, 5.6.7.8#53
Mar 29 11:16:45 ns2 named[25422]: listening on IPv4 interface lo0, 127.0.0.1#53
Mar 29 11:16:45 ns2 named[25422]: generating session key for dynamic DNS
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 0.IN-ADDR.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 127.IN-ADDR.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 254.169.IN-ADDR.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Mar 29 11:16:45 ns2 named[25422]: 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
Mar 29 11:16:45 ns2 named[25422]: automatic empty 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
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: D.F.IP6.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 8.E.F.IP6.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: 9.E.F.IP6.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: A.E.F.IP6.ARPA
Mar 29 11:16:45 ns2 named[25422]: automatic empty zone: B.E.F.IP6.ARPA
Mar 29 11:16:45 ns2 named[25422]: command channel listening on 127.0.0.1#953
Mar 29 11:17:26 ns2 named[25422]: xfer-in: info: transfer of 'domen.ru/IN' from 1.2.3.4#53: connected using .5.6.7.8#57787
Mar 29 11:17:26 ns2 named[25422]: xfer-in: info: transfer of 'domen.ru/IN' from 5.6.7.8#53:
Transfer completed: 1 messages, 9 records, 316 bytes, 0.104 secs (3038 bytes/sec)
Mar 29 11:17:27 ns2 named[25422]: xfer-in: info: transfer of '3.2.1.in-addr.arpa/IN' from 1.2.3.4#53: connected using 5.6.7.8#65158
Mar 29 11:17:27 ns2 named[25422]: xfer-in: info: transfer of '3.2.1.in-addr.arpa/IN' from 1.2.3.4#53:
Transfer completed: 1 messages, 7 records, 306 bytes, 0.104 secs (2942 bytes/sec)
Код: Выделить всё
# whois domen.ru
% By submitting a query to RIPN's Whois Service
% you agree to abide by the following terms of use:
% http://www.ripn.net/about/servpol.html#3.2 (in Russian)
% http://www.ripn.net/about/en/servpol.html#3.2 (in English).
domain: DOMEN.RU
nserver: ns1.domen.ru. 1.2.3.4
nserver: ns2.domen.ru. 5.6.7.8
state: REGISTERED, DELEGATED, VERIFIED
person: Private person
phone: +7 000 566 97 00
e-mail: pisem@net.ru
registrar: REGRU-REG-RIPN
created: 2001.08.10
paid-till: 2011.08.14
source: TCI
Last updated on 2010.03.29 07:16:30 MSK/MSD
Код: Выделить всё
> nslookup domen.ru
Server: 127.0.0.1
Address: 127.0.0.1:53
*** 127.0.0.1 can't find domain.ru: Non-existent host/domain
Мастер сервер:
Код: Выделить всё
allow tcp from any to me 53
allow udp from any to any 53
allow udp from any 53 to any
Код: Выделить всё
allow tcp from any to me 53
allow udp from any to any 53
allow udp from any 53 to any
Заранее спс за помощь!
