CentOS

Install NameSerer(bind) on CentOS 7

1. Intro

How to Install bind on CentOS 7

 

2. Command

– Install

yum install bind bind-chroot

– Add Service

systemctl enable named

– Configure file

vi /etc/named.conf

listen-on port 53 { any; }
lisetn-on-v6 port 53 { none; }
allow-query { any; }

vi /etc/named.rfc1912.zones

zone "test.com"    IN    {
    type master;
    file "test.com.db";
    allow-update { none; };
}

named-checkconf ; conf 파일 무결성 검사

vi /var/named/test.com.db

$TTL    1M
@    SOA    @    root.    (201805300    1D    1H    1W    1H)
     IN    NS    @
     IN    A    192.168.10.20
     IN    MX    10    mail.test.com

www    IN    A    192.168.10.20
ftp    IN    A    192.168.10.20
mail   IN    A    192.168.10.20

named-checkzone [Domain] [Zone File] ; zone 파일 무결성 검사
named-checkzone test.com test.com.db

– Start Service

systemctl start named

– Add Firewall rule

firewall-cmd –permanent –zone=public –add-service=dns
firewall-cmd –reload

Back To Top