named.conf
Код: Выделить всё
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
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";
};
include "/etc/bind/named.conf.local";named.conf.local
Код: Выделить всё
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
secret 7xP0LR5OXL+Srwc6+qK1XQ==;
};
zone "lukas.dom" IN {
type master;
file "/var/lib/bind/db.lukas";
allow-update { key DHCP_UPDATER; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "/var/lib/bind/db.rev_lukas";
allow-update { key DHCP_UPDATER; };
};named.conf.options
Код: Выделить всё
options {
directory "/var/cache/bind";
// 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 and later use an unprivileged
// port by default.
// query-source address * port 53;
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {192.168.1.1;};
listen-on { 127.0.0.1; 192.168.1.3;};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};db.lukas
Код: Выделить всё
$ORIGIN .
$TTL 86400; 1 day
lukas.dom IN SOA ds1.lukas.dom. root.lukas.dom. (
200216888; serial
28800; refresh (8 hours)
7200; retry (2 hours)
604800; expire (1 week)
86400; minimum (1 day)
)
NS ds1.
$ORIGIN lukas.dom.
gw1 A 192.168.1.1; Запись для для шлюза нашей локальной сети.
ds1 A 192.168.1.3; Это наш DNS-сервер
pdc A 192.168.1.3; Запись для контроллера домена локальной сети.db.rev_lukas
Код: Выделить всё
$ORIGIN .
$TTL 86400; 1 day
1.168.192.in-addr.arpa IN SOA ds1.lukas.dom. root.lukas.dom. (
2001105145; serial
28800; refresh (8 hours)
14400; retry (4 hours)
3600000; expire (5 weeks 6 days 16 hours)
3600000; minimum (5 weeks 6 days 16 hours)
)
NS ds1.
$ORIGIN 1.168.192.in-addr.arpa.
1 PTR gw1.lukas.dom.
2 PTR ds1.lukas.dom.; Это наш DNS-сервер
3 PTR ds1.lukas.dom.такое он пишет в консоли:
Код: Выделить всё
lukas@lukas-desktop:~$ sudo su
sudo: unable to resolve host lukas-desktop
[sudo] password for lukas:
root@lukas-desktop:/home/lukas# /ets/init.d/bind9 restart
bash: /ets/init.d/bind9: No such file or directory
root@lukas-desktop:/home/lukas# /etc/init.d/bind9 restart
* Stopping domain name service... bind [ OK ]
* Starting domain name service... bind [ OK ]
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# dig ns1
; <<>> DiG 9.4.2-P2 <<>> ns1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 239
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;ns1. IN A
;; AUTHORITY SECTION:
. 6272 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009102900 1800 900 604800 86400
;; Query time: 31 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Oct 25 23:54:59 2009
;; MSG SIZE rcvd: 96
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# /etc/init.d/bind9 restart
* Stopping domain name service... bind [ OK ]
* Starting domain name service... bind [ OK ]
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# host ns1.lukas.dom
Host ns1.lukas.dom.lukas.dom not found: 2(SERVFAIL)
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# host 192.168.1.3
Host 3.1.168.192.in-addr.arpa not found: 2(SERVFAIL)
root@lukas-desktop:/home/lukas# /etc/init.d/bind9 stop
* Stopping domain name service... bind [ OK ]
root@lukas-desktop:/home/lukas# /etc/init.d/bind9 start
* Starting domain name service... bind [ OK ]
root@lukas-desktop:/home/lukas# host ya.ru
ya.ru has address 77.88.21.8
ya.ru has address 93.158.134.8
ya.ru has address 213.180.204.8
ya.ru mail is handled by 10 mx1.yandex.ru.
ya.ru mail is handled by 10 mx2.yandex.ru.
root@lukas-desktop:/home/lukas# host lukas
Host lukas not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# host dom
Host dom not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# /etc/init.d/bind9 restart
* Stopping domain name service... bind [ OK ]
* Starting domain name service... bind [ OK ]
root@lukas-desktop:/home/lukas# dig ns1
; <<>> DiG 9.4.2-P2 <<>> ns1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 11150
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;ns1. IN A
;; AUTHORITY SECTION:
. 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009102901 1800 900 604800 86400
;; Query time: 3512 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Oct 26 00:17:44 2009
;; MSG SIZE rcvd: 96
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# clear
root@lukas-desktop:/home/lukas# /etc/init.d/bind9 restart
* Stopping domain name service... bind [ OK ]
* Starting domain name service... bind [ OK ]
root@lukas-desktop:/home/lukas# dig ns1
; <<>> DiG 9.4.2-P2 <<>> ns1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41205
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;ns1. IN A
;; AUTHORITY SECTION:
. 2853 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009102900 1800 900 604800 86400
;; Query time: 533 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Oct 26 00:51:58 2009
;; MSG SIZE rcvd: 96
root@lukas-desktop:/home/lukas# dig rambler.ru
; <<>> DiG 9.4.2-P2 <<>> rambler.ru
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23190
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;rambler.ru. IN A
;; ANSWER SECTION:
rambler.ru. 2955 IN A 81.19.70.3
;; AUTHORITY SECTION:
rambler.ru. 2930 IN NS ns2.rambler.ru.
rambler.ru. 2930 IN NS ns4.rambler.ru.
rambler.ru. 2930 IN NS ns3.rambler.ru.
rambler.ru. 2930 IN NS ns5.rambler.ru.
;; ADDITIONAL SECTION:
ns3.rambler.ru. 126 IN A 81.19.66.62
ns4.rambler.ru. 126 IN A 81.19.67.89
ns5.rambler.ru. 126 IN A 81.19.67.90
ns2.rambler.ru. 126 IN A 81.19.66.61
;; Query time: 504 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Oct 26 00:52:09 2009
;; MSG SIZE rcvd: 180
root@lukas-desktop:/home/lukas# host rambler.ru
rambler.ru has address 81.19.70.3
rambler.ru mail is handled by 5 imx1.rambler.ru.
rambler.ru mail is handled by 10 imx2.rambler.ru.
root@lukas-desktop:/home/lukas# host ns1
Host ns1 not found: 3(NXDOMAIN)
root@lukas-desktop:/home/lukas# host 192.168.1.3
Host 3.1.168.192.in-addr.arpa not found: 2(SERVFAIL)
root@lukas-desktop:/home/lukas#В этих делах я новичёк? делал вот по этому мануалу: http://traffpro.ru/forum/topic_1126
Там всё работает, а у меня чёт не преобразуется(