0% found this document useful (0 votes)
35 views

DNS Linux

This document provides instructions for configuring DNS services using BIND9 on Linux. It includes steps to install and configure BIND, define forward and reverse lookup zones for local domains, and configure clients to use the DNS server. Key steps are to install and configure BIND, define zones for domains like zumaquero.local and 192.168.100 in the named.conf.local file, check configurations and restart BIND. The document also describes making the DNS configuration persistent on reboot.
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

DNS Linux

This document provides instructions for configuring DNS services using BIND9 on Linux. It includes steps to install and configure BIND, define forward and reverse lookup zones for local domains, and configure clients to use the DNS server. Key steps are to install and configure BIND, define zones for domains like zumaquero.local and 192.168.100 in the named.conf.local file, check configurations and restart BIND. The document also describes making the DNS configuration persistent on reboot.
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 3

DNS LINUX

apt install bind9 bind9-utils


ufw allow bind9 ----------Cuando tengamos activo el firewall, que por defecto no está.
systemctl status bind9
nano /etc/bind/named.conf.options -------------ponemos:
listen-on { any; };
allow-query { localhost; 192.168.100.0/24; };

forwarders {
8.8.8.8;
};
dnssec-validation no;

#listen-on-v6 { any; };

Utilizar el uso único de ipv4:

nano /etc/default/named -----------ponemos:


OPTIONS="-u bind -4"
verificamos que no hay errores:
named-checkconf
systemctl restart bind9
----Quitamos el dns 8.8.8.8 en el cliente y ponemos el dns: 192.168.100.1(ip del servidor)

Agregar zonas:

nano /etc/bind/named.conf.local

zone "zumaquero.local" IN {
type master;
file "/etc/bind/zonas/db.zumaquero.local";
};

zone "100.168.192.in-addr.arpa"{
type master;
file "/etc/bind/zonas/db.100.168.198";

};

mkdir /etc/bind/zonas
cp /etc/bind/db.local /etc/bind/zonas/db.zumaquero.local
nano /etc/bind/zonas/db.zumaquero.local
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA servidor.zumaquero.local. root.zumaquero.local. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS servidor.zumaquero.local.
servidor IN A 192.168.100.1
equipo01 IN A 192.168.100.105
server IN CNAME servidor

cp /etc/bind/zonas/db.zumaquero.local /etc/bind/zonas/db.100.168.192

nano /etc/bind/zonas/db.100.168.192

;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA servidor.zumaquero.local. root.zumaquero.local. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS servidor.zumaquero.local.
1 IN PTR servidor.zumaquero.local.

named-checkconf /etc/bind/named.conf.local
named-checkzone zumaquero.local /etc/bind/zonas/db.zumaquero.local
named-checkzone 100.168.192.in-addr.arpa /etc/bind/zonas/db.100.168.192
-------todos tienen que dar ok----------
systemctl restart bind9

----queda por completar----

cp /etc/resolv.conf /etc/resolv.conf.bak
chattr +i /etc/resolv.conf
chattr +i /etc/resolv.conf.bak -----no no da error
elimino el fichero original:
rm /etc/resolv.conf
copio el .bak como .conf :
cp /etc/resolv.conf.bak /etc/resolv.conf
-------esto ultimo es para que cuando apaguemos la máquina y volvamos a encenderla, se mantenga
la configuración----------

You might also like