DevOps/리눅스 / / 2020. 1. 4. 09:28

centos bind 구축 및 네임서버 설정방법

반응형

centos bind 구축 및 네임서버 설정방법

 

1.설치

yum -y install bind-* rpcbind

 

vi /etc/named.conf

 

listen-on port 53 { any; }  포트허용

allow-query  {any; }; dns접속 허용

 

2.zone설정

vi /etc/named.rfc1912.zones

 

zone "aa.com" IN {   //도메인 입력

        type master;   //서버 타입 지정

        file "aa.com.zone";   //zone파일이름설정

        allow-update { none; };  //동기화 할 서버 ip

};

 

zone "100.168.192.in-addr.arpa" IN {

        type master;

        file "192.168.100.50.zone";

        allow-update { none; };

};

 

 

hostname myhost

 

3.zone파일 생성

 

cp -ap named.localhost aa.com.zone

 

@ hostname

정방향 

 

$TTL 86400

@       IN SOA  www.aa.com. root(

                                        77      ; serial

                                        10800   ; refresh

                                        900     ; retry

                                        604800  ; expire

                                        86400 ) ; minimum

        IN      NS      www.aa.com.

        IN      A       192.168.100.50

www     IN      A       192.168.100.50

 

역방향

$TTL 86400

@       IN SOA  www.aa.com. root(

                                        78      ; serial

                                        10800   ; refresh

                                        900     ; retry

                                        604800  ; expire

                                        86400 ) ; minimum

        IN      NS      www.aa.com.

50      IN      PTR     www.aa.com.

 

 


$TTL 86400   //데이터의 수면

@       IN SOA  www.aa.com. root( 

                                        77      ; serial            버전

                                        10800   ; refresh       3시간

                                        900     ; retry          15분

                                        604800  ; expire     1주일

                                        86400 ) ; minimum   하루

        IN      NS      www.aa.com.     //네임서버 자체 설정

        IN      A       192.168.100.50           //네임서버 자체 설정

www     IN      A       192.168.100.50    //아이피 관리

-------------------------------------------------------

 

chgrp named aa.com.zone

chmod g+w aa.com.zone

 

service named restart

 

 

 

 

역방향 조회

 nslookup

 set type=ptr 

 

 

 

 

 

 

 

 

 

반응형
  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유