Servidores DNS Ubuntu Server 12.04
Instalación y configuración de servidores DNS.
- Server Primario o master. - Autorizado para la zona
- Server secundario o slave. - No autorizado.
- Servidor Caché.
A tener en cuenta:
hostname debe contener el nombre de la máquina: en este caso "server".
hosts debe contener ip_de_la_máquina nombre_máquina.dominio alias:
192.168.1.6 (o 127.0.1.1) server.miempresa.com server
Instalación de servidor primario BIND9 en una distribución Ubuntu server 12.04
~$sudo aptitude install bind9 bind9utils
~$cd /etc/bind
Editamos named.conf.options. Cambiamos "dnssec-validation" a "no" de momento, para que syslog no nos dé la "lata".
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// 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 {
// 8.8.8.8;
// 8.8.4.4;
// };
//======================================================================$
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//======================================================================$
auth-nxdomain no; # conform to RFC1035
//listen-on-v6 { any; };
dnssec-validation no;
};
Editamos "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 "miempresa.com" { -> El nombre de la zona directa.
type master;
file "/etc/bind/db.miempresa.com"; -> Zona directa.
allow-transfer { 192.168.1.5; }; -> Esclavo permitido.
also-notify { 192.168.1.5; }; -> Notificaciones.
};
zone "1.168.192.in-addr.arpa" { -> El nombre de la zona inversa.
type master;
file "/etc/bind/db.192"; -> Zona inversa.
allow-transfer { 192.168.1.5; };
also-notify { 192.168.1.5; };
};
Creamos las zonas en el directorio:
~$cp db.local db.miempresa.com
~$cp db.127 db.192
Editamos db.miempresa.com
Ejemplo de zona directa:
;
; BIND data file for local miempresa.com interface
;
$TTL 604800
@ IN SOA miepresa.com. root.miempresa.com. (
2012102602 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
IN NS server.miempresa.com.
; IN NS server1.miempresa.com.
;hosts
@ IN A 192.168.1.6
server IN A 192.168.1.6
server1 IN A 192.168.1.5
Editamos db.192
Ejemplo de zona inversa:
;
; BIND reverse data file for local 192.168.1.xxx interface
;
$TTL 604800
@ IN SOA server.miempresa.com. root.miempresa.com. (
2012102607 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS server.
;
6 IN PTR server.miempresa.com.
5 IN PTR server1.miempresa.com.
~$sudo service bind9 restart
Listo el servidor primario.
No hay comentarios:
Publicar un comentario