bind v9 s DHCP a ddns update - allow-update
david na hlacik.eu
david na hlacik.eu
Čtvrtek Listopad 1 13:01:51 CET 2007
Cau vsichni,
resim zapeklity problem. Kdyz v konfiguraci bindu pouziju views, tak mi
definice domeny master s podporou allow-update {key rndckey;}; nefunguje.
v logoch vidim, ze DHCP pri pokusu dynamicky pridat zaznam do domeny
napise hlasku
Nov 1 12:39:36 localhost dhcpd: Unable to add forward map from
david-notebook.office.hlacik.eu to 10.
11.12.200: not authorized
Kdyz vsak nepouzivam views v konfiguraci bind vsechno funguje OK.
Pro detail Vam poslu funkcni named.conf bez pouziti view a nefunkcni
named.conf s pouziti views.
-----------FUNKCNI NAMED.CONF----------------
# Use with the following in named.conf, adjusting the allow list as
needed:
key "rndckey" {
algorithm hmac-md5;
secret "I3nhtlEni4JmkmqLXrZ1ag==";
};
#
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; 10.11.12.0/24; } keys { "rndckey"; };
};
# End of named.conf
options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;
query-source-v6 port 53;
// Put files that named is allowed to write in the data/
directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
forwarders { 192.168.2.1; };
};
logging
{
/* If you want to enable debugging, eg. using the 'rndc trace'
command,
* named will try to write the 'named.run' file in the directory
(/var/named).
* By default, SELinux policy does not allow named to modify the
/var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "hlacik.eu" {
type slave;
file "slaves/hlacik.eu.db";
masters { 81.2.194.130; } ;
// put slave zones in the slaves/ directory so named can
update them
};
zone "office.hlacik.eu" {
type master;
allow-update { key rndckey; };
file "slaves/office.hlacik.eu.db";
// put dynamically updateable zones in the slaves/
directory so named can update them
};
zone "12.11.10.in-addr.arpa" {
type master;
allow-update { key rndckey; };
file "slaves/office.hlacik.eu.rev.db";
// put dynamically updateable zones in the slaves/
directory so named can update them
};
--------KONEC FUNKCNIHO NAMED.CONF------------------
-----NEFUNKCNI NAMED.CONF--------------------------
# Use with the following in named.conf, adjusting the allow list as
needed:
key "rndckey" {
algorithm hmac-md5;
secret "I3nhtlEni4JmkmqLXrZ1ag==";
};
#
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; 10.11.12.0/24; } keys { "rndckey"; };
};
# End of named.conf
options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;
query-source-v6 port 53;
// Put files that named is allowed to write in the data/
directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
};
logging
{
/* If you want to enable debugging, eg. using the 'rndc trace'
command,
* named will try to write the 'named.run' file in the directory
(/var/named).
* By default, SELinux policy does not allow named to modify the
/var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view "localhost_resolver"
{
/* This view sets up named to be a localhost resolver ( caching only
nameserver ).
* If all you want is a caching-only nameserver, then you need only define
this view:
*/
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
# all views must contain the root hints zone:
include "/etc/named.root.hints";
/* these are zones that contain definitions for all the localhost
* names and addresses, as recommended in RFC1912 - these names
should
* ONLY be served to localhost clients:
*/
include "/etc/named.rfc1912.zones";
};
view "internal"
{
/* This view will contain zones you want to serve only to "internal"
clients
that connect via your directly attached LAN interfaces - "localnets" .
*/
match-clients { any; };
match-destinations { any; };
recursion yes;
// all views must contain the root hints zone:
include "/etc/named.root.hints";
// include "named.rfc1912.zones";
// you should not serve your rfc1912 names to non-localhost
clients.
// These are your "authoritative" internal zones, and would
probably
// also be included in the "localhost_resolver" view above :
#zone "my.internal.zone" {
# type master;
# file "my.internal.zone.db";
#};
zone "hlacik.eu" {
type slave;
file "slaves/hlacik.eu.db";
masters { 81.2.194.130; } ;
// put slave zones in the slaves/ directory so named can
update them
};
zone "office.hlacik.eu" {
type master;
allow-update { key rndckey; };
file "slaves/office.hlacik.eu.db";
// put dynamically updateable zones in the slaves/
directory so named can update them
};
zone "12.11.10.in-addr.arpa" {
type master;
allow-update { key rndckey; };
file "slaves/office.hlacik.eu.rev.db";
// put dynamically updateable zones in the slaves/
directory so named can update them
};
};
};
#key ddns_key
#{
# algorithm hmac-md5;
# secret "use /usr/sbin/dns-keygen to generate TSIG keys";
#};
view "external"
{
/* This view will contain zones you want to serve only to "external"
clients
* that have addresses that are not on your directly attached LAN
interface subnets:
*/
match-clients { !localnets; !localhost; };
match-destinations { !localnets; !localhost; };
recursion no;
// you'd probably want to deny recursion to external clients, so
you don't
// end up providing free DNS service to all takers
// all views must contain the root hints zone:
include "/etc/named.root.hints";
// These are your "authoritative" external zones, and would
probably
// contain entries for just your web and mail servers:
#zone "my.external.zone" {
# type master;
# file "my.external.zone.db";
#};
};
------KONEC nefunkcniho named.conf --------
predem strasne moc dekuji za vyreseni problemu - zabil jsem s tim 2 dny.
Další informace o konferenci Linux