기술노트
[Linux] name 서버 설치(bind) | |
---|---|
작성자 : 관리자(jieun@ehostidc.co.kr) 작성일 : 2018-06-15 조회수 : 4508 | |
OS : CentOS 7.4 bind 버전 : bind-9.9.4
1. bind 설치(1/2차 서버) [root@ns1 ehost]# yum install bind
2. 1차 네임 서버 named.conf [root@ns1 ehost]# vi /etc/named.conf options { #dns 공격 방지(등록된 도메인외 쿼리 안해줌) allow-transfer { 2차 네임서버 IP; }; dnssec-enable yes; /* Path to ISC DLV key */ # managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid";
#2차 네임서버 zone을 text 로 설정(default raw) masterfile-format text;
#존파일 이름검사를 무시 check-names master ignore; check-names slave ignore; #_ 가 들어가더라도 정상처리 #업데이트 정보 2차 네임서버 전송 category lame-servers {null;}; }; controls {inet 127.0.0.1 allow { localhost; 2차네임서버IP; } keys { rndckey; }; }; logging { category lame-servers { null; }; category notify { null; }; channel default_debug { null; }; channel debug_log { file "/var/log/named_debug.log" versions 10 size 20M; severity dynamic; print-category yes; print-severity yes; print-time yes; }; category security { debug_log; }; 3. 2차 네임서버 named.conf [root@ns2 ehost]# vi /etc/named.conf //// named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // // See the BIND Administrator's Reference Manual (ARM) for details about the // configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html options { dnssec-enable yes; /* Path to ISC DLV key */ pid-file "/run/named/named.pid"; check-names slave ignore; check-names response ignore; category lame-servers {null;}; };
controls { logging { category lame-servers { null; }; category notify { null; }; channel default_debug { null; }; category xfer-in { debug_log; }; category xfer-out { debug_log; }; category general { debug_log; default_syslog; }; }; 4. 도메인 등록(1차) [root@ns1 ehost]# vi /etc/named.conf zone 파일 등록[root@ns1 ehost]# vi /var/named/ehostidc.co.kr $TTL 86400 IN NS ns.ehostidc.co.kr. ns IN A 127.0.0.1 설정 파일 check [root@ns1 data]# /usr/sbin/named-checkconf -z "$NAMEDCONF"; 특정 zone 만 체크 [root@ns1 data]# named-checkzone ehostidc.co.kr /var/named/ehostidc.co.kr 서비스 reload [root@ns1 log]# systemctl reload named 5. 도메인 등록(2차) [root@ns2 ehost]# vi /etc/named.conf
서비스 reload [root@ns1 log]# systemctl reload named 6. 방화벽 등록- dns 서비스 등록 firewall-cmd --zone=public --add-service=dns - firewall save firewall-cmd --runtime-to-permanent - firewall service 확인 firewall-cmd --zone=public --list-services |
|
이전글 | [Linux] PDNS-네임서버 (PowerDNS) 설치 및 replication |
다음글 | [Linux] Php7-fpm + zts + pthreads + redis (centos7) |