Si tu veux être dns maître de ton domaine, tu peux utiliser un truc comme ça, mais c'est la misère a gérer :
named.conf
// secret must be the same as in /etc/bind/rndc.conf
include "/etc/bind/rndc.key";
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { mykey; };
};
//Logging section
logging {
channel security_channel {
file "/var/log/bind/security.log" versions 4 size 10m;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
channel default_channel {
file "/var/log/bind/default.log" versions 4 size 10m;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
channel xfer-in_channel {
file "/var/log/bind/xfer-in.log" versions 4 size 10m;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
channel xfer-out_channel {
file "/var/log/bind/xfer-out.log" versions 4 size 10m;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
channel update_channel {
file "/var/log/bind/update.log" versions 4 size 10m;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
channel notify_channel {
file "/var/log/bind/notify.log" versions 4 size 10m;
severity info;
print-category yes;
print-severity yes;
print-time yes;
};
category security { security_channel; };
category default { default_channel; };
category xfer-in { xfer-in_channel; };
category xfer-out { xfer-out_channel; };
category notify { notify_channel; };
category update { update_channel; };
category lame-servers { null; };
category delegation-only { "null" ; };
};
// 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 "domaine.ext" {
type master;
notify yes;
file "/etc/bind/db.domaine.ext";
zone-statistics true;
};
/etc/bind/db.domaine.ext
$TTL 1d
@ IN SOA ns.domain2.ext. email.domain2.ext. (
2006030100 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
6400 ; Minimum
)
@ IN NS ns.domain2.ext.
@ IN NS dns.domain2.ext.
info IN TXT "un texte..."
@ IN MX 10 xx.xx.xx.xx
@ IN MX 50 xxx.dyndns.org.
IN A xx.xx.xx.xx
smtp IN A xx.xx.xx.xx
imap IN A xx.xx.xx.xx
ftp IN A xx.xx.xx.xx
www IN A xx.xx.xx.xx
;redir all other non set subdomain
* IN A xx.xx.xx.xx
/etc/bind/rndc.key
key mykey {
algorithm hmac-md5;
secret "une suite de texte quelconque";
};
/etc/bind/rndc.conf
// secret must be the same as in /etc/named.conf
include "/etc/bind/rndc.key";
options {
default-key mykey;
default-server 127.0.0.1;
default-port 953;
};
# Hum, quel utilisation
Posté par Raphaël G. (site web personnel) . En réponse au message exemple de config bind9.3.2. Évalué à 2.
// secret must be the same as in /etc/bind/rndc.conf include "/etc/bind/rndc.key"; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { mykey; }; }; //Logging section logging { channel security_channel { file "/var/log/bind/security.log" versions 4 size 10m; severity info; print-category yes; print-severity yes; print-time yes; }; channel default_channel { file "/var/log/bind/default.log" versions 4 size 10m; severity info; print-category yes; print-severity yes; print-time yes; }; channel xfer-in_channel { file "/var/log/bind/xfer-in.log" versions 4 size 10m; severity info; print-category yes; print-severity yes; print-time yes; }; channel xfer-out_channel { file "/var/log/bind/xfer-out.log" versions 4 size 10m; severity info; print-category yes; print-severity yes; print-time yes; }; channel update_channel { file "/var/log/bind/update.log" versions 4 size 10m; severity info; print-category yes; print-severity yes; print-time yes; }; channel notify_channel { file "/var/log/bind/notify.log" versions 4 size 10m; severity info; print-category yes; print-severity yes; print-time yes; }; category security { security_channel; }; category default { default_channel; }; category xfer-in { xfer-in_channel; }; category xfer-out { xfer-out_channel; }; category notify { notify_channel; }; category update { update_channel; }; category lame-servers { null; }; category delegation-only { "null" ; }; }; // 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 "domaine.ext" { type master; notify yes; file "/etc/bind/db.domaine.ext"; zone-statistics true; };/etc/bind/db.domaine.ext /etc/bind/rndc.keykey mykey { algorithm hmac-md5; secret "une suite de texte quelconque"; };/etc/bind/rndc.conf// secret must be the same as in /etc/named.conf include "/etc/bind/rndc.key"; options { default-key mykey; default-server 127.0.0.1; default-port 953; };