Configuración Servidor DNS Linux Centos
Configuración Servidor DNS Linux Centos
Instalar BIND 9.
#vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
//
//
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
/*
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "sisope.local" IN {
type master;
file "forward.sisope";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "reverse.sisope";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Tenemos que crear los archivos de Zona Directa (Forward) y Zona Inversa (Reverse) que
indicamos en /etc/named.conf .
vi /var/named/forward.sisope
$TTL 86400
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
@ IN NS primario.sisope.local.
@ IN A 192.168.1.44
@ IN A 192.168.1.103
primario IN A 192.168.1.44
cliente IN A 192.168.1.103
vi /var/named/reverse.sisope
$TTL 86400
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
@ IN NS primario.sisope.local.
@ IN PTR sisope.local.
primario IN A 192.168.1.44
cliente IN A 192.168.1.103
44 IN PTR primario.sisope.local.
Configuramos el Firewall
firewall-cmd --reload
Configuramos Permisos
#named-checkconf /etc/named.conf
OK
OK
#dig primario.sisope.local
;; Got answer:
;; QUESTION SECTION:
;primario.unixmen.local. IN A
;; ANSWER SECTION:
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; SERVER: 192.168.1.44#53(192.168.1.44)
#nslookup sisope.local
Server: 192.168.1.44
Address: 192.168.1.44#53