DNS Linux

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy