관련 서버에 대한 기술 정보:

관련 서버에 대한 기술 정보:

내 설정에 대한 몇 가지 정보는 다음과 같습니다. 내 LAN 서브넷에 Ubuntu 16.04 시스템에서 실행되는 기본 DNS 서버가 있습니다. 또한 다양한 다른 서브넷(DMZ 서브넷, 서비스 서브넷 등)에 몇 개의 슬레이브 DNS 서버가 있습니다. 모든 DNS 슬레이브 서버는 다양한 유형의 Linux를 실행합니다.

내 기본 DNS 서버는 여러 다른 서브넷을 알아야 하므로 분할 DNS/분할 지평선으로 설정됩니다.

내 방화벽에는 LAN, WAN 및 DMZ의 세 가지 영역이 정의되어 있습니다. 보안상의 이유로 DMZ에서 LAN으로의 연결을 시작할 수 없습니다. 연결은 LAN 서브넷에서 시작되어야 합니다. 이는 정책에 따른 것이므로 변경하고 싶지 않습니다.

관련 서버에 대한 기술 정보:

Master DNS on my LAN subnet:
OS: Ubuntu 16.04
Hostname: master.lan.mydomain.dk
IP: 192.168.1.4 255.255.255.0

Slave DNS on DMZ subnet:
OS: Debian 9
Hostname: tools.dmz.mydomain.dk
IP: 172.16.1.4 255.255.255.0

곧바로 메인 서버에서 분할 지평선 설정이 제대로 작동했습니다. 하지만 마스터와 슬레이브 간의 복제는 불가능합니다. 영역 파일은 전송되지 않습니다.

관련 설정 파일은 다음과 같습니다.

기본 DNS 서버의 name.conf:

key "rndc-key" {
    algorithm hmac-md5;
    secret "w26wwSa7rJB04IsuW99kGQ==";
};

controls {
    inet 127.0.0.1 port 953
    allow { 127.0.0.1; } keys { "rndc-key"; };
};

include "/etc/bind/named.conf.logging";
include "/etc/bind/named.conf.keys";
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";

기본 DNS 서버의 name.conf.keys:

키 정의는 별도의 파일에 배치되므로 rsync를 통해 쉽게 업데이트할 수 있습니다.

key lan-key {
    algorithm HMAC-MD5;
    secret AaEjmxhg3WT2; 
};

key dmz-key {
    algorithm HMAC-MD5;
    secret BEhp4DeLnX4u;
};

key service-key {
    algorithm HMAC-MD5;
    secret 7rP4CN3Km2QT;
};

key management-key {
    algorithm HMAC-MD5;
    secret gNsRz2H7AxLH;
};

key update-key {
    algorithm HMAC-MD5;
    secret B88bqW33Fuap;
};

기본 DNS 서버의 names.conf.local:

//
// Do any local configuration here
//
// Keys are defined in /etc/bind/named.conf.keys
//

acl lan-subnet {
    !key dmz-key;
    !key service-key;
    !key management-key;
    key lan-key;
    127.0.0.0/8;
    192.168.1.0/24;
};

acl dmz-subnet {
    !key lan-key;
    !key service-key;
    !key management-key;
    key dmz-key;
    172.16.1.0/24;
};

acl service-subnet {
    !key lan-key;
    !key dmz-key;
    !key management-key;
    key service-key;
    192.168.128.0/24;
};

acl management-subnet {
    !key lan-key;
    !key dmz-key;
    !key service-key;
    key management-key;
    10.21.12.0/24;
};

view "internal" {
    match-clients { lan-subnet; };
    allow-recursion { any; };
    allow-transfer { key lan-key; };
    allow-update { key update-key; };

    // prime the server with knowledge of the root servers
    zone "." {
        type hint;
        file "/etc/bind/db.root";
    };

// be authoritative for the localhost forward and reverse zones, and for
    // broadcast zones as per RFC 1912
    zone "localhost" {
        type master;
        file "/etc/bind/db.local";
    };
    zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
    };
    zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
    };
    zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
    };

    zone "lan.mydomain.dk" {
        type master;
        file "/etc/bind/internals/db.lan.mydomain.dk"; # zone file path
        also-notify { 192.168.1.5 key lan-key; };
        notify yes;
    };
    zone "1.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/internals/db.192.168.1-rev";
        also-notify { 192.168.1.5 key lan-key; };
        notify yes;
    };

    zone "dmz.mydomain.dk" {
        type master;
        file "/etc/bind/internals/db.dmz.mydomain.dk"; # zone file path
        also-notify {
            192.168.1.5 key lan-key;
            172.16.1.4 key dmz-key;
            172.16.1.5 key dmz-key;
            127.0.0.1 key dmz-key;
        };
        notify yes;
    };
    zone "1.16.172.in-addr.arpa" {
        type master;
        file "/etc/bind/internals/db.172.16.1-rev";
        also-notify {
            192.168.1.5 key lan-key;
            172.16.1.4 key dmz-key;
            172.16.1.5 key dmz-key;
            127.0.0.1 key dmz-key;
        };
        notify yes;
    };

zone "service.mydomain.dk" {
        type master;
        file "/etc/bind/internals/db.service.mydomain.dk"; # zone file path
        also-notify {
            192.168.1.5 key lan-key;
            192.168.1.10 key service-key;
            192.168.1.11 key service-key;
            127.0.0.1 key service-key;
        };
        notify yes;
    };
    zone "128.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/internals/db.192.168.128-rev";
        also-notify {
            192.168.1.5 key lan-key;
            192.168.1.10 key service-key;
            192.168.1.11 key service-key;
            127.0.0.1 key service-key;
        };
        notify yes;
    };

    zone "management.mydomain.dk" {
        type master;
        file "/etc/bind/internals/db.management.mydomain.dk"; # zone file path
        also-notify {
            192.168.1.5 key lan-key;
            10.21.12.4 key management-key;
            127.0.0.1 key management-key;
        };
        notify yes;
    };
    zone "12.21.10.in-addr.arpa" {
        type master;
        file "/etc/bind/internals/db.10.21.12-rev";
        also-notify {
            192.168.1.5 key lan-key;
            10.21.12.4 key management-key;
            127.0.0.1 key management-key;
        };
        notify yes;
    };

};

view "externals" {
    match-clients { any; };
    allow-recursion { none; };
    allow-transfer { key dmz-key; };

    zone "dmz.mydomain.dk" {
        type slave;
        masters { 127.0.0.1 key lan-key; };
        file "/etc/bind/externals/db.dmz.mydomain.dk"; # zone file path
        also-notify { 192.168.1.5 key dmz-key; };
    };
    zone "1.16.172.in-addr.arpa" {
        type slave;
        masters { 127.0.0.1 key lan-key; };
        file "/etc/bind/externals/db.172.16.1-rev";
        also-notify { 192.168.1.5 key dmz-key; };
    };
};

view "services" {
    match-clients { service-subnet; };
    allow-recursion { none; };
    allow-transfer { key service-key; };

    zone "service.mydomain.dk" {
        type slave;
        masters { 127.0.0.1 key lan-key; };
        file "/etc/bind/services/db.service.mydomain.dk"; # zone file path
        also-notify { 192.168.1.5 key service-key; };
    };
    zone "128.168.192.in-addr.arpa" {
        type slave;
        masters { 127.0.0.1 key lan-key; };
        file "/etc/bind/services/db.192.168.128-rev";
        also-notify { 192.168.1.5 key service-key; };
    };
};

view "management" {
    match-clients { management-subnet; };
    allow-recursion { none; };
    allow-transfer { key management-key; };

    zone "management.mydomain.dk" {
        type slave;
        masters { 127.0.0.1 key lan-key; };
        file "/etc/bind/management/db.management.mydomain.dk"; # zone file path
        also-notify { 192.168.1.5 key management-key; };
    };
    zone "12.21.10.in-addr.arpa" {
        type slave;
        masters { 127.0.0.1 key lan-key; };
        file "/etc/bind/management/db.10.21.12-rev";
        also-notify { 192.168.1.5 key management-key; };
    };
};

기본 DNS 서버의 db.dmz.mydomain.dk:

$TTL    604800
@       IN      SOA     ns1.dmz.mydomain.dk. root.lan.mydomain.dk. (
                     2018102001         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL

; name and mail servers - NS records
@   IN      NS      ns1.dmz.mydomain.dk.
    IN      NS      ns2.dmz.mydomain.dk.
    IN      MX      10 proxymail.dmz.mydomain.dk.
    IN      A       172.16.1.4

; name servers - A records
ns1.dmz.mydomain.dk.               IN      A       172.16.1.4
ns2.dmz.mydomain.dk.               IN      A       172.16.1.5

; 172.16.1.0/24 - A records
fwdmz.dmz.mydomain.dk.             IN      A       172.16.1.2
tools.dmz.mydomain.dk.             IN      A       172.16.1.4
x3690.vmhost.dmz.mydomain.dk.      IN      A       172.16.1.20
x3650.vmhost.dmz.mydomain.dk.      IN      A       172.16.1.21
wwwgate.dmz.mydomain.dk.           IN      A       172.16.1.30
proxymail.dmz.mydomain.dk.         IN      A       172.16.1.40

슬레이브 DNS 서버의named.conf.local:

zone "dmz.mydomain.dk" {
    type slave;
    file "/etc/bind/slaves/db.dmz.mydomain.dk";
    masters { 172.16.1.1 key dmz-key; };
};

zone "1.16.172.in-addr.arpa" {
    type slave;
    file "/etc/bind/slaves/db.172.16.1-rev";
    masters { 172.16.1.1 key dmz-key; };
};

위에서 볼 수 있듯이 기본 IP 주소를 DMZ 서브넷의 게이트웨이 주소인 172.16.1.1로 설정했습니다. 방화벽은 모든 LAN 주소를 DMZ 게이트웨이 주소로 변환하고 그 뒤에 호스트 포트 번호를 붙입니다. 따라서 방화벽을 통과할 수 없는 메인 서버의 LAN IP 주소에 입력하는 것은 의미가 없습니다.

On the slave server there is the following error message:
"zone dmz.mydomain.dk/IN: refused notify from non-master: 172.16.1.1#47161".

그러면 메인 서버 이름을 172.16.1.1#47161이 아닌 172.16.1.1로만 지정했기 때문에 에러 메시지가 나타나는 이유를 알 수 있습니다. 그렇다면 슬레이브 서버에서 Bind9을 IP 주소뿐만 아니라 IP 주소와 임의의 포트 번호로 받아들이도록 하려면 어떻게 해야 할까요?

미리 감사드립니다.

답변1

DNS BIND 전송은 더 큰 패킷/TCP 패킷을 사용합니다.

문제는 DNS 프로토콜/DNS 패킷 크기 및/또는 수년간 EDNS0을 지원하는 ASA 검사기의 변경으로 인해 발생할 수 있습니다.

기본적으로 ASA는 DNS 검사기 규칙에 실패한 더 큰 패킷을 삭제합니다. DNSSEC가 마음에 들면 이러한 변경도 수행해야 합니다.

ASA 8.2.2 이상의 경우 다음을 수행합니다.

policy-map type inspect dns preset_dns_map
    parameters
        message-length maximum client auto
        message-length maximum 4096

ASA 버전에 따라 다음을 수행해야 할 수도 있습니다.

fixup protocol dns maximum-length 4096
fixup protocol dns 4096

바라보다DNSSEC 준비: 성공적인 구현을 위한 모범 사례, 권장 사항 및 팁

관련 정보