How to configure BIND with DESSEC
출처 : http://dns.kisa.or.kr/jsp/resources/dns/dnssecInfo/dnssecBind.jsp |
CentOS 7 Version |
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux |
Network Interface Card |
[root@localhost ~]# ip addr show eno16777736 |
To install packages for BIND |
[root@localhost ~]# yum -y install bind bind-libs bind-utils |
[root@localhost ~]# vi /etc/named.conf |
options { recursion no;
dnssec-enable yes; |
[root@localhost ~]# vi /etc/named.rfc1912.zones |
zone "kgitbank.local" IN { file "kgitbank.local.db.signed";
zone "8.168.192.in-addr.arpa" IN { |
[root@localhost ~]# cd /var/named |
[root@localhost named]#cp -a named.empty kgitbank.local.db [root@localhost named]#cp -a named.loopback kgitbank.local.rdb |
[root@localhost named]# vi /var/named/kgitbank.local.db |
$TTL 3H |
[root@localhost named]# vi /var/named/kgitbank.local.rdb |
$TTL 1D |
kgitbank.local 존의 존 서명키(ZSK) 생성 |
# mkdir /var/named/keys # chown root:named /var/named/keys # cd /var/named/keys # dnssec-keygen -a NSEC3RSASHA1 -r /dev/urandom -b 1024 -n ZONE kgitbank.local. |
kgitbank.local 존의 키 서명키(KSK) 생성 |
# cd /var/named/keys # dnssec-keygen -a NSEC3RSASHA1 -r /dev/urandom -b 2048 -n ZONE -f KSK kgitbank.local. |
[root@lux01 keys]# ls -l |
kgitbank.local 의 공개키(public key)는 키 서명키(KSK)와 존 서명키(ZSK) 각각에 해당하는 DNSKEY 리소스 레코드를 도메인 존 파일에 반영 설정하는 절차입니다. |
# vi /var/named/kgitbank.local.db $INCLUDE Kkgitbank.local.+007+46143.key |
kgitbank.local 의 기본 존 파일 kgitbank.local.db 을 대상으로 DNSSEC 서명처리를 수행하는 절차입니다. 여기서는 서명키들이 /var/named/keys 에 저장되어 있다고 가정합니다. |
# dnssec-signzone -S –K /var/named/keys -3 96e920 -o kgitbank.local. kgitbank.local.db
서명처리에 의해 "서명된 존 파일"은 kgitbank.local.db.signed 라는 이름으로 생성됩니다. |
Describe used options |
-S : Smart signing: Instructs dnssec-signzone to search the key repository for keys that match the zone being signed, and to include them in the zone if appropriate.
-K directory : Key repository: Specify a directory to search for DNSSEC keys. If not specified, defaults to the current directory. -3 salt : Generate an NSEC3 chain with the given hex encoded salt. A dash (salt) can be used to indicate that no salt is to be used when generating the NSEC3 chain.
-o origin :The zone origin. If not specified, the name of the zone file is assumed to be the origin. |
Start bind daemon |
[root@localhost named]# systemctl start named.service |
Auto remount |
[root@localhost named]# systemctl enable named.service [root@localhost ~]# systemctl list-unit-files |
# named-checkzone kgitbank.local /var/named/kgitbank.local.db.signed |
zone kgitbank.local/IN: loaded serial 2017091805 (DNSSEC signed) |
DNSSEC valification |
[root@lux01 keys]# dig @192.168.8.136 kgitbank.local soa +dnssec +multiline |
DNSSEC