DNS Ubuntu Revisado Completo

En el primario



instalar bind9

sudo apt update -y && sudo apt upgrade -y

sudo apt install bind9

sudo apt install gedit

sudo gedit /etc/bind/named.conf.local



zone "aulaSMR113.local" {
type master;
file "/etc/bind/db.aulaSMR113.local";
allow-transfer {192.168.32.141;};
};

zone "32.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.32";
allow-transfer {192.168.32.141;};
};

sudo systemctl restart named

sudo gedit /etc/bind/db.aulaSMR113.local

$TTL 1D

@ IN SOA ns.aulaSMR113.local. alumnop.aulaSMR113.local. (

    1 ; serial

    604800 ; refresh

    86400 ; retry

    2419200 ; expiration

    604800 ; TTL negative cache

)


; Registros NS (servidores de nombres)


@ IN NS ns.aulaSMR113.local.


; Registros A


ns    IN    A    192.168.32.140

ai1pc100    IN    A    192.168.32.100

ai1pc101    IN    A    192.168.32.101

alumnop    IN    A    192.168.32.140

alumnos    IN    A    192.168.32.141

sudo systemctl restart named

named-checkzone aulaSMR113.local /etc/bind/db.aulaSMR113.local

nslookup ai1pc100.aulaSMR113.local 192.168.32.140

sudo gedit /etc/bind/db.192.168.32

$TTL 1D


@ IN SOA ns.aulaSMR113.local. alumnop.aulaSMR113.local. (

    1 ; serial

    604800 ; refresh

    86400 ; retry

    2419200 ; expiration

    604800 ; TTL negative cache

)


; Registros NS (servidores de nombres)


@ IN NS ns.192.168.32.arpa.


; Registros A


1    IN    PTR    router

100    IN    PTR    ai1pc100.aulaSMR113.local.

101    IN    PTR    ai1pc101.aulaSMR113.local.

140    IN    PTR    alumnop.aulaSMR113.local.

141    IN    PTR    alumnos.aulaSMR113.local.


sudo systemctl restart named

named-checkzone 192.168.32 /etc/bind/db.192.168.32


Esclavo


zone "aulaSMR113.local" {

type slave;

file /var/cache/bind/db.aulaSMR113.local";

masters {192.168.32.140;};

};


zone "32.168.192.in-addr.arpa" {

type slave;

file "/var/cache/bind/db.192.168.32";

masters {192.168.32.140;};

};


sudo systemctl restart named

nslookup 192.168.32.100 192.168.32.140

nslookup ai1pc100.aulaSMR113.local 192.168.32.140

nslookup 192.168.32.100 192.168.32.141

nslookup ai1pc100.aulaSMR113.local 192.168.32.141

Comments

Popular Posts