Diferencia entre revisiones de «DNS Master en paloma»

De CURE - Informática
Saltar a: navegación, buscar
Línea 122: Línea 122:
 
  search taller.csic.edu.uy
 
  search taller.csic.edu.uy
 
  domain taller.csic.edu.uy
 
  domain taller.csic.edu.uy
  nameserver 127.0.0.1
+
  nameserver 164.73.128.5
 +
nameserver 164.73.128.70
  
  

Revisión del 21:23 7 jun 2011

Instalación de un servisor DNS Master en paloma:

Instalación

# sudo apt-get install bind9 bind9-doc dnsutils

Configuración

Los archivos de configuracion del Bind estan en /etc/bind/

$ sudo vi /etc/bind/named.conf.options
root@paloma:~# cat /etc/bind/named.conf.options
//acl redesNegadas define las redes a denegar consultas al servidor DNS
acl redesNegadas { 0.0.0.0/8; 1.0.0.0/8; 2.0.0.0/8; 192.0.2.0/24; 224.0.0.0/3; 172.16.0.0/12; 10.0.0.0/8; 192.168.0.0/24; 169.254.0.0/16; 192.168.1.0/24; 192.168.2.0/24;
192.168.3.0/24; };
options {
//desactivamos la cache
acache-enable no;
directory "/var/cache/bind";
//No es necesario forwardear
//forwarders {
// 164.73.128.5;
// 164.73.128.70;
// };
//No permitimos las consultas salvo las de nuestra zona y las propias del servidor
allow-query { 127.0.0.1; };
//No permitimos las recusion
allow-recursion { none; };
//Incluimos las redes de la acl redesNegadas a la lista negra
blackhole { redesNegadas; };
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
// 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.
};


$ sudo vi/etc/bind/named.conf.local

Editamos este archivo para definir las zonas directas e inversas de nuestro dominio, y los archivos donde estaran las configuraciones de las mismas.

root@paloma:~# cat /etc/bind/named.conf.local
//
// Do any local configuration here
//
//Definimos nuestra zona de dominio taller.csic.edu.uy
//Nuestro dns solo va a contestar por esta zona
zone "taller.csic.edu.uy"{
type master;
file "/etc/bind/db.taller.csic.edu.uy";
allow-query { any;};
};
zone "234.73.164.in-addr.arpa"{
type master;
file "/etc/bind/db.164.73.234";
allow-query { any;};
};
//include "/etc/bind/zones.rfc1918";


Creamos db.taller.csic.edu.uy copiando /etc/bind/db.local como /etc/bind/db.taller.csic.edu.uy


root@paloma:~# cat /etc/bind/db.taller.csic.edu.uy
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA taller.csic.edu.uy. root.dns. (
2011060201 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS taller.csic.edu.uy.
@ IN A 164.73.234.104
paloma IN A 164.73.234.104
pedrera IN A 164.73.234.102
polonio IN A 164.73.234.103
garzon IN A 164.73.234.126
base-de-datos IN CNAME paloma
tikiwiki IN CNAME paloma


Creamos db.164.73.234 copiando db.127


root@paloma:~# cat /etc/bind/db.164.73.234
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA taller.csic.edu.uy. root.dns. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS taller.csic.edu.uy.
@ IN PTR taller.csic.edu.uy.
102 IN PTR pedrera.taller.csic.edu.uy.
103 IN PTR polonio.taller.csic.edu.uy.
104 IN PTR paloma.taller.csic.edu.uy.
126 IN PTR garzon.taller.csic.edu.uy. 


Editamos el archivo /etc/reslov.conf


$ sudo vi /etc/resolv.conf

search taller.csic.edu.uy
domain taller.csic.edu.uy
nameserver 164.73.128.5
nameserver 164.73.128.70


Referencias:

http://linuxsilo.net/articles/bind.html

http://www.javcasta.com/2011/05/09/ubuntu-servidor-dns-cache-para-una-red-local-lan-stub-con-bind9/