Configuración Servidor DNS
Configuración Servidor DNS
Configuración Servidor DNS
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="5d0428b3-6af2-4f6b-9fe3-4250cd839efa"
ONBOOT="yes"
HWADDR="08:00:27:19:68:73"
IPADDR0="192.168.1.44"
PREFIX0="24"
GATEWAY0="192.168.1.1"
DNS="192.168.1.44"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
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";
Crear los archivos de ZONA:
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:
;; OPT PSEUDOSECTION:
;; QUESTION SECTION:
;primario.unixmen.local. IN A
;; ANSWER SECTION:
;; AUTHORITY SECTION:
;; ADDITIONAL SECTION:
;; SERVER: 192.168.1.44#53(192.168.1.44)
;; WHEN: Wed Aug 20 16:20:46 IST 2014
#nslookup sisope.local
…………….
Server: 192.168.1.44
Address: 192.168.1.44#53