How to install and configure BIND9 master & slave DNS on debian 12 step by step

preview_player
Показать описание
Title: How to Install and Configure BIND9 Master and Slave DNS Server on Debian 12

Description:

In this tutorial, we'll walk through the process of setting up a master-slave DNS server configuration using BIND9 on Debian 12. DNS (Domain Name System) is crucial for translating domain names into IP addresses, making it an essential component of network infrastructure.

In this step-by-step guide, you'll learn how to:

Install BIND9 on Debian 12.
Configure the master DNS server.
Configure the slave DNS server for zone transfers.
Test the DNS setup to ensure proper functionality.
Whether you're setting up a DNS server for a small home network or a large enterprise environment, this tutorial will provide you with the necessary knowledge to establish a reliable DNS infrastructure using BIND9 on Debian 12.

Settings:
Installing BIND9 on both master and slave servers:
apt-get -y install bind9 bind9utils bind9-doc

Check the version and status of the server:
named -v
sudo systemctl status named

Set the OPTIONS for IPv4:
nano /etc/default/named
options = " -u bind -4"

acl trusted {
192.168.178.100;
192.168.178.150;
192.168.178.0/24;
};

options {
directory "/var/cache/bind";
allow-query { any; };
allow-recursion { trusted; };
allow-transfer { none; };
listen-on port 53 { localhost; 192.168.178.100; };
forwarders { 8.8.8.8; 8.8.4.4; };
dnssec-validation auto;
listen-on-v6 { any; };
};

type master;
allow-notify { 192.168.178.150; };
};

type master;
allow-notify { 192.168.178.150; };
};

Create forward zone file for Master:
$TTL 604800
2024032600 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL

;DNS Server Record
master IN A 192.168.178.10
slave IN A 192.168.178.20

;Application DNS Records
www IN A 192.168.178.160
mail IN A 192.168.178.170
ftp IN A 192.168.178.180

Check the zone file:
named-checkconf -z

Create reverse zone file for Master:

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

;DNS Server Records

;Reverse Lookup

;Application PTR Records

Check the zone file for error:

Restart bind:
systemctl restart named
systemctl status named

Change DNS IP:
nano /etc/netwok/interfaces

Test:

#itskills23 #dns #bind9
Don't forget to like, share, and subscribe for more tutorials on networking and server administration!
Рекомендации по теме
Комментарии
Автор

when we configure slave dns that mean all the master dns file to slave dns then it will continue to resolve, can we see same files in slave dns like our master forward/reverse files?

mohitpanwar
Автор

i connect my server via wifi network i cant modified network interface code i dont know why? please help

devadinesh