Portál AbcLinuxu, 4. května 2025 19:14
etc/bind/
mám soubory zones.rfc1918, rndc.key, named.conf.local, named.conf, named.conf.options a soubory db.local,root,empty,255,127,0
. Instaloval jsem z distribučního balíčku.
Protože se soubory od návodu liší, upravil jsem je, tak jak jsem myslel, že je to správně. Správně to není, protože mi to nefunguje.
Tady jsou soubory, které jsem upravoval:
Soubor 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 { 212.65.193.6; 212.65.242.210; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; };Soubor
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";Soubor
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 "1.168.192.in-addr.arpa" { type master; file "/etc/bind/named.rev"; }; $TTL 86400 @ IN SOA ripnet.no-ip.org. admin.ripnet.no-ip.org. ( 2007061400 ; 10800 ; 1800 ; 1209600 ; 604800 ) ; IN NS ns.ripnet.no-ip.org. IN MX 10 mail.ripnet.no-ip.org. ns IN A 192.168.1.2 ; mail IN A 192.168.1.2 ; server IN A 192.168.1.2 ; www IN CNAME server michal IN A 192.168.1.3 ;Soubor
named.rev
, na který se odkazuje jsem vytvořil ručně a vypadá takhle:
$TTL 604800 @ IN SOA 1.168.192.in-addr.arpa. admin.ripnet.no-ip.org. ( 2007061301 ; 10800 ; 1800 ; 1209600 ; 604800 ) ; IN NS ns.ripnet.no-ip.org. 3 IN PTR michal.ripnet.no-ip.org 2 IN PTR www.ripnet.no-ip.org 2 IN PTR server.ripnet.no-ip.org 2 IN PTR mail.ripnet.no-ip.org 2 IN PTR ns.ripnet.no-ip.orgAsi mám špatně strukturu, ale jako začátečník nevím, co do kterého souboru patří. Poradí mi někdo, kam co dát, nebo popřípadě je možné použít i tu minimalistickou strukturu v Debian Etch? Nebo je problém jinde? Omlouvám se za dlouhou nudli, ale zkopíroval jsem zdrojáky, tak jak jsou, aby se v nich dala lépe hledat případná chyba. Díky moc za rady.
named.conf.local
se do souboru named.conf
přesune:
zone "ripnet.no-ip.org.in-addr.arpa" { type master; file "/etc/bind/ripnet.no-ip.org"; };V souboru
ripnet.no-ip.org
se přepíšou neveřejné adresy na veřejnou a z veřejných se udělá soubor třeba ripnet.no-ip.org.rev pro reverzní překlad veřejných IP Lokální zůstanou jak jsou.
Do souboru named.conf
přibude zóna:
zone "veřejnáIP.in-addr.arpa" { type master; file "/etc/bind/ripnet.no-ip.org.rev"; };Nebo je to možná blbost, vyzkouším a uvidím a dám vědět.
nameserver 192.168.1.2 domain ripnet.no-ip.org search ripnet.no-ip.orgetc/hosts jsem needitoval, nemyslíš náhodou etc/hosts.conf? V etc/hosts je jen komentář:
# The following lines are desirable for IPv6 capable hostsV souboru etc/hosts.conf mám tohle:
order bind,hosts multi onmail jsem do zóny přidal. Do logu se podívám a hodím sem, co v nich je.
Jun 19 18:53:23 server named[2210]: starting BIND 9.3.4 -u bind Jun 19 18:53:23 server named[2210]: found 1 CPU, using 1 worker thread Jun 19 18:53:24 server named[2210]: loading configuration from '/etc/bind/named.conf' Jun 19 18:53:24 server named[2210]: listening on IPv6 interfaces, port 53 Jun 19 18:53:24 server named[2210]: listening on IPv4 interface lo, 127.0.0.1#53 Jun 19 18:53:24 server named[2210]: listening on IPv4 interface eth0, 192.168.1.2#53 Jun 19 18:53:24 server named[2210]: command channel listening on 127.0.0.1#953 Jun 19 18:53:24 server named[2210]: command channel listening on ::1#953 Jun 19 18:53:24 server named[2210]: zone 0.in-addr.arpa/IN: loaded serial 1 Jun 19 18:53:24 server named[2210]: zone 127.in-addr.arpa/IN: loaded serial 1 Jun 19 18:53:24 server named[2210]: zone 1.168.192.in-addr.arpa/IN: has no NS records Jun 19 18:53:24 server named[2210]: zone 255.in-addr.arpa/IN: loaded serial 1 Jun 19 18:53:24 server named[2210]: zone ripnet.no-ip.org.in-addr.arpa/IN: has no NS records Jun 19 18:53:24 server named[2210]: zone localhost/IN: loaded serial 1 Jun 19 18:53:24 server named[2210]: runningPíše, že v zńách nejsou NS záznamy. Ale v named.conf se normálně odkazuje na soubory, kde je ta konfigurace, co jsem psal nahoře.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.