Paweł
2005-12-02 23:47:51 UTC
Witam wszystkich
Probuje skonfigurować serwer DNS i trochę mi to nie wychodzi i nie
wiem dlaczego. Może problem jest w konfiguracji klientów bo
konfiguracja jest raczej dobra. Komunikacja jest dobra jak się bazuje
tylko na adresach IP. Przy okazji powiedzcie co trzeba wpisać do
plików hosts, host i hostname. Są dwie sieci nie podłączone do netu.
Pierwsza ma adres 192.168.0.0 i maskę 255.255.255.0, a druga sieć
192.168.1.0 i taka sama maska. Domenę sobie wymyśliłem taką:
"pawel.pl" . DNS a zarazem router łączący obie sieci stoi na
Debianie(eth0:192.168.0.7-Debian2, eth1:192.168.1.7-Debian2).
Sprawdzam DNS przez program nslookup pod WinXP(192.168.0.1) i pod
Debianem(eth0:192.168.0.4-Debian1 i eth1:192.168.1.4-Debian1) przez
program host i nslookup. Poniżej zamieszczam zawartość plików
zmodyfikowanych przeze mnie. Jeśli będzie potrzeba mogę podesłać co
pokazuje program Ethereal z WinXP jak probuje uzyc program nslookup i
wynik programu tcpdump z Kompa z DNS-em.
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: db.192.168.0
$ttl 3h ;domyslny ttl dla strefy
;rekord SOA
0.168.192.in-addr.arpa. IN SOA debian2.pawel.pl.
pawel.debian2.pawel.pl. (
02030202
3h
1h
1w
1h );koniec rekordu SOA
;Serwer dla strefy 0.168.192.in-addr.arpa
0.168.192.in-addr.arpa. IN NS debian2.pawel.pl.
;Rekordy zasobów
1.0.168.192.in-addr.arpa. IN PTR neo.pawel.pl.
4.0.168.192.in-addr.arpa. IN PTR debian.pawel.pl.
7.0.168.192.in-addr.arpa. IN PTR debian2.pawel.pl.
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: db.pawel.pl
$ttl 3h ; domyslny ttl dla strefy
;poczatek rekordu SOA
pawel.pl. IN SOA debian2.pawel.pl. pawel.debian2.pawel.pl. (
2002081001
3H
15M
1W
1D ); koniec rekordu SOA
;Serwery nazw dla domeny pawel.pol
pawel.pl. IN NS debian2.pawel.pl.
;Rekordy zasobów strefy pawel.pl
neo.pawel.pl. IN A 192.168.0.1
debian.pawel.pl. IN A 192.168.0.4
debian2.pawel.pl. IN A 192.168.0.7
;Definicje aliasów
www.pawel.pl. IN CNAME debian2.pawel.pl.
dns.pawel.pl. IN CNAME debian2.pawel.pl.
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: 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 {
// 0.0.0.0;
// };
listen-on {all;};
auth-nxdomain no; # conform to RFC1035
};
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: 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";
};
// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };
// From the release notes:
// Because many of our users are uncomfortable receiving undelegated
answers
// from root or top level domains, other than a few for whom that
behaviour
// has been trusted and expected for quite some length of time, we
have now
// introduced the "root-delegations-only" feature which applies
delegation-only
// logic to all top level domains, and to the root domain. An
exception list
// should be specified, including "MUSEUM" and "DE", and any other
top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
include "/etc/bind/named.conf.local";
////////////////////////
//MOJE CUDOWANIA
////////////////////////
//odwzorowanie normalne
zone "pawel.pl" IN {
type master; //MASTER OZNACZA ZE JEST TO KONFIGURACJA SERWERA
PODSTAWOWEGO A NIE ZAPASOWEGO
file "db.pawel.pl"; //plik gdzie jest konfiguracja tej strefy
};
//odwzorowanie odwrotne
zone "0.168.192.in-addr.arpa" IN {
type master;
file "db.192.168.0";
};
Probuje skonfigurować serwer DNS i trochę mi to nie wychodzi i nie
wiem dlaczego. Może problem jest w konfiguracji klientów bo
konfiguracja jest raczej dobra. Komunikacja jest dobra jak się bazuje
tylko na adresach IP. Przy okazji powiedzcie co trzeba wpisać do
plików hosts, host i hostname. Są dwie sieci nie podłączone do netu.
Pierwsza ma adres 192.168.0.0 i maskę 255.255.255.0, a druga sieć
192.168.1.0 i taka sama maska. Domenę sobie wymyśliłem taką:
"pawel.pl" . DNS a zarazem router łączący obie sieci stoi na
Debianie(eth0:192.168.0.7-Debian2, eth1:192.168.1.7-Debian2).
Sprawdzam DNS przez program nslookup pod WinXP(192.168.0.1) i pod
Debianem(eth0:192.168.0.4-Debian1 i eth1:192.168.1.4-Debian1) przez
program host i nslookup. Poniżej zamieszczam zawartość plików
zmodyfikowanych przeze mnie. Jeśli będzie potrzeba mogę podesłać co
pokazuje program Ethereal z WinXP jak probuje uzyc program nslookup i
wynik programu tcpdump z Kompa z DNS-em.
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: db.192.168.0
$ttl 3h ;domyslny ttl dla strefy
;rekord SOA
0.168.192.in-addr.arpa. IN SOA debian2.pawel.pl.
pawel.debian2.pawel.pl. (
02030202
3h
1h
1w
1h );koniec rekordu SOA
;Serwer dla strefy 0.168.192.in-addr.arpa
0.168.192.in-addr.arpa. IN NS debian2.pawel.pl.
;Rekordy zasobów
1.0.168.192.in-addr.arpa. IN PTR neo.pawel.pl.
4.0.168.192.in-addr.arpa. IN PTR debian.pawel.pl.
7.0.168.192.in-addr.arpa. IN PTR debian2.pawel.pl.
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: db.pawel.pl
$ttl 3h ; domyslny ttl dla strefy
;poczatek rekordu SOA
pawel.pl. IN SOA debian2.pawel.pl. pawel.debian2.pawel.pl. (
2002081001
3H
15M
1W
1D ); koniec rekordu SOA
;Serwery nazw dla domeny pawel.pol
pawel.pl. IN NS debian2.pawel.pl.
;Rekordy zasobów strefy pawel.pl
neo.pawel.pl. IN A 192.168.0.1
debian.pawel.pl. IN A 192.168.0.4
debian2.pawel.pl. IN A 192.168.0.7
;Definicje aliasów
www.pawel.pl. IN CNAME debian2.pawel.pl.
dns.pawel.pl. IN CNAME debian2.pawel.pl.
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: 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 {
// 0.0.0.0;
// };
listen-on {all;};
auth-nxdomain no; # conform to RFC1035
};
/////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
PLIK: 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";
};
// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };
// From the release notes:
// Because many of our users are uncomfortable receiving undelegated
answers
// from root or top level domains, other than a few for whom that
behaviour
// has been trusted and expected for quite some length of time, we
have now
// introduced the "root-delegations-only" feature which applies
delegation-only
// logic to all top level domains, and to the root domain. An
exception list
// should be specified, including "MUSEUM" and "DE", and any other
top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
include "/etc/bind/named.conf.local";
////////////////////////
//MOJE CUDOWANIA
////////////////////////
//odwzorowanie normalne
zone "pawel.pl" IN {
type master; //MASTER OZNACZA ZE JEST TO KONFIGURACJA SERWERA
PODSTAWOWEGO A NIE ZAPASOWEGO
file "db.pawel.pl"; //plik gdzie jest konfiguracja tej strefy
};
//odwzorowanie odwrotne
zone "0.168.192.in-addr.arpa" IN {
type master;
file "db.192.168.0";
};
--
Jeśli chcesz się podzielić swoją wiedzą, zajrzyj na stronę
www.wikipedia.pl
Jeśli chcesz się podzielić swoją wiedzą, zajrzyj na stronę
www.wikipedia.pl