Professional Documents
Culture Documents
INSTALL BIND:-
[root@dns ~]# yum install bind bind-utils -y
CONFIGUR NAMED.CONF:-
[root@dns ~]# vim /etc/named.conf
options {
listen-on port 53 { 127.0.0.1; 192.168.110.21; };
# listen-on-v6 port 53 { ::1; };
allow-query { localhost; 192.168.110.0/24; };
allow-transfer { localhost; 192.168.110.22; };
####################################
zone "main.com" IN {
type master;
file "forward.main.com";
allow-update { none; };
};
zone "110.168.192.in-addr.arpa" IN {
type master;
file "reverse.main.com";
allow-update { none; };
};
###################################
CREATE FORWARD ZONE FILE:-
[root@dns ~]# vim /var/named/forward.main.com
NOTE:- Every time you edit a zone file, you should increment the serial value be
fore you restart the named process
$TTL 86400
@ IN SOA dns.main.com. root.main.com. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS dns.main.com.
@ IN NS cdns.main.com.
@ IN A 192.168.110.21
@ IN A 192.168.110.22
@ IN A 192.168.110.30
dns IN A 192.168.110.21
cdns IN A 192.168.110.22
cl1 IN A 192.168.110.30
FIREWALL CONFIGURATION:-
[root@dns ~]# firewall-cmd --permanent --add-service=dns
[root@dns ~]# firewall-cmd --permanent --add-port=53/tcp
[root@dns ~]# firewall-cmd --permanent --add-port=53/udp
[root@dns ~]# firewall-cmd --reload
START/ENABLE SERVICE:-
[root@dns ~]# systemctl enable named.service
[root@dns ~]# systemctl start named.service
NETWORK SETTINGS:-
[root@dns etc]# vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
DNS1=192.168.110.21
TEST DNS:-
dig dns.main.com
CREATE FORWARD AND REVERSE ZONE FILE:-
CREATE A FORWARD ZONE FILE
vi /etc/named/named.conf.local
zone "dns.main.com" {
type master;
file "/etc/named/zones/db.dns.main.com"; # zone file path
};