Install and Configure BIND 9 Master and Slave DNS Server for Local Network using AlmaLinux 9

preview_player
Показать описание
In this video, I will show you how I installed and configured a DNS server for my local network.

The DNS server that I installed is the de-facto standard Bind 9.

PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)

I also setup two DNS servers as master and slave.

LINKS:

Commands and Configuration:
Master DNS IP: 192.168.0.10
Slave DNS IP: 192.168.0.11

Primary DNS
sudo dnf -y update
sudo dnf install -y bind bind-utils
sudo systemctl enable named --now
sudo systemctl status named
listen-on port 53 { localnets;};
allow-query { localhost; 192.168.0.0/24; };
allow-transfer {192.168.0.11/32;};

type master;
allow-update { none; };
};
type master;
allow-update { none; };
};

sudo named-checkconf
$TTL 604800

2022102901 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL

ns1 IN A 192.168.0.10
ns2 IN A 192.168.0.11

$TTL 604800
2022102901
604800
86400
2419200
604800 )


sudo systemctl restart named
sudo firewall-cmd --permanent --add-port=53/tcp
sudo firewall-cmd --permanent --add-port=53/udp
sudo firewall-cmd --reload

Secondary DNS:
sudo dnf -y update
sudo dnf install -y bind bind-utils
sudo systemctl enable named --now
sudo systemctl status named
listen-on port 53 { localnets;};
allow-query { localnets; };

type slave;
masters { 192.168.0.10; };
};

type slave;
masters { 192.168.0.10; };
};

sudo named-checkconf
sudo systemctl restart named
sudo ls -l /var/named/slaves/
sudo firewall-cmd --permanent --add-port=53/tcp
sudo firewall-cmd --permanent --add-port=53/udp
sudo firewall-cmd --reload
nameserver 192.168.0.10
nameserver 192.168.0.11

Chapters:
00:00 Intro
00:53 Primary DNS - Update Server
01:04 Primary DNS - Install BIND 9
01:22 Primary DNS - Configuration
03:07 Primary DNS - Forward Lookup Zone File
03:29 Primary DNS - Reverse Lookup Zone File
04:11 Primary DNS - Firewall
04:29 Secondary DNS - Update Server
04:51 Secondary DNS - Install BIND 9
05:04 Secondary DNS - Configuration
06:42 Secondary DNS - Firewall
07:00 Verification
08:21 Configure Client DNS
09:07 Outro

Please enjoy the video and if you have any questions, leave a comment down below.

Remember to Like, Share and Subscribe if you enjoyed the video!
Рекомендации по теме
Комментарии
Автор

Very nice and concise, this has been an invaluable resource for me. Thank you for the video!

oscargoldman
Автор

Thank you so much, its very clear and well explained ! Love it !

xtztv
Автор

In the named.conf file.. did you leave "recursion" set to yes?

nanoatom
Автор

Can you create a video on LDAP? Looking into an alternative to AD. Salamat!

bisoy
Автор

Well those are local netowrk ip's. But how you would setup 2 nameservers (master+slave) in real world with 2 different public ip's. You cannot create 2 nameservers for 1 public ip.

dacool