w internecie znalazłem piekny opis z tej strony
mam kilka wątpliwości i chciał bym aby jakis fachowiec rzucił okiem przedstawie moje pliki w katalogu /etc/bind
plik named.conf
Kod: Zaznacz cały
more 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 "moja_domena" {
type master;
file "/etc/bind/moja_domena";
allow-transfer { 194.204.159.1; 194.204.152.34; };
notify yes;
};
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";
Kod: Zaznacz cały
more moja_domena
$TTL 86400
$ORIGIN moja_domena.
@ IN SOA ns1.moja_domena. moja_domena. (
2005070901 ; Serial
10800 ; Refresh
3600 ; Retry
2419200 ; Expire
10800 ) ; NXDOMAIN TTL
IN NS ns1.moja_domena.
IN NS ns2.moja_domena.
IN MX 5 mail.moja_domena.
@ IN A mój_zew_ip
www IN A mój_zew_ip
mail IN A mój_zew_ip
ftp IN CNAME moja_domena
Kod: Zaznacz cały
more named.conf.options
options {
directory "/var/cache/bind";
listen-on { any; };
listen-on-v6 { any; };
auth-nxdomain yes;
query-source address * port 53;
transfer-source * port 53;
notify-source * port 53;
version "Microsoft DNS Server v1.5 (WinME)";
forwarders { 194.204.159.1; 194.204.152.34; };
};
Kod: Zaznacz cały
more 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";
zone "moja_domena" {
type master;
file "/etc/bind/moja_domena";
allow-transfer { 194.204.159.1; 194.204.152.34; };
notify yes;
};
[ Dodano: 2007-07-29, 21:45 ]
Dobrze na podstawie tej konfiguracji bind działa ale pojawił sie inny problem mianowiecie podczas restartu:
Kod: Zaznacz cały
/etc/init.d/bind9 reload
Reloading domain name service...: bindrndc: connect failed: 127.0.0.1#953: connection refused
failed!
Kod: Zaznacz cały
Jul 30 10:14:54 maksior named[28352]: starting BIND 9.4.1-P1 -u bind -t /var/lib/named
Jul 30 10:14:54 maksior named[28352]: found 1 CPU, using 1 worker thread
Jul 30 10:14:54 maksior named[28352]: loading configuration from '/etc/bind/named.conf'
Jul 30 10:14:54 maksior named[28352]: /etc/bind/named.conf.local:8: zone 'maksior.zadupie.eu': already exists previous definition: /etc/bind/named.conf:13
Jul 30 10:14:54 maksior named[28352]: loading configuration: failure
Jul 30 10:14:54 maksior named[28352]: exiting (due to fatal error)