DNSSEC - 無法簽署相關文件

DNSSEC - 無法簽署相關文件

我已經在 Ubuntu 22.04 LTS 上設定了一個工作 DNS 伺服器作為單一伺服器的一部分(DNS、SPF、電子郵件、防火牆等)IP:192.168.122.189 測試網域:jetj.ltd 主機名稱:mail

我擁有的檔案是:db.jetj.ltd:

;
; BIND data file for jetj.ltd  
;

$INCLUDE /etc/bind/keys/Kjetj.ltd.+008+12125.key

$TTL 86400

@       IN      SOA     mail.jetj.ltd. karti.jetj.ltd. (
                2023082501 ; Serial
                3600       ; Refresh
                1800       ; Retry
                604800     ; Expire
                86400      ; Minimum TTL
)
; Name Server (NS) records  
@       IN      NS      mail.jetj.ltd.
@       IN      A       192.168.122.189

; A record for the domain's nameserver
mail   IN      A       192.168.122.189

; Mail Exchanger (MX) record   
@       IN      MX      10 mail.jetj.ltd.

命名.conf.選項:

options {
    directory "/var/cache/bind";
    recursion yes;
    listen-on { 192.168.122.189; };
    allow-query { localhost; 192.168.122.0/24; }; // Allow queries from localhost and your local network
    forwarders {
        8.8.8.8;
        8.8.4.4;
    };
        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;
        listen-on-v6 { any; };
};

trust-anchors {
    "." initial-key 256 3 8 "AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjF
     FVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoX
     bfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaD
     X6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpz
     W5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relS
     Qageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulq
     QxA+Uk1ihz0=";
};

命名.conf.local:

zone "jetj.ltd" {
    type master;
    file "/etc/bind/db.jetj.ltd";
    dnssec-policy default;
    inline-signing yes;
};

zone "122.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/db.192";
    dnssec-policy default;
    inline-signing yes;
};

當我運行named-checkconf時 - 根本沒有錯誤。我透過運行來獲取密鑰:

sudo dnssec-keygen -a RSASHA256 -b 2048 -f KSK -L 9000000 jetj.ltd

我將它們添加到 db.jetj.ltd 檔案中。

然而,當我嘗試 dnssec-signzone 時,我收到以下錯誤:

karti@mail:/etc/bind$ dnssec-signzone -S -K keys/ db.jetj.ltd
dnssec-signzone: fatal: No signing keys specified or found.

我檢查並更改了密鑰,如下所示:

karti@mail:/etc/bind/keys$ cat Kjetj.ltd.+008+12125.key
; This is a key-signing key, keyid 12125, for jetj.ltd.
; Created: 20230905194204 (Tue Sep  5 19:42:04 2023)
; Publish: 20230905194204 (Tue Sep  5 19:42:04 2023)
; Activate: 20230905194204 (Tue Sep  5 19:42:04 2023)
jetj.ltd. 9000000 IN DNSKEY 257 3 8 AwEAAbSbc3FDpa6u5FWnxza3wBzY+j6/zj6fs/5UWzzC5EmVugKloM9H 2j+2y6K8ShWDj744COlOFA+JfbFHzhFWDeg/MpXyKX8ah5K2rB3apdQc 48BytgoXgflyBHO9/tHJOlkNDNiL7Nk3VBLABl2MZr2+XM5bQV9Bx8bA tBI+8+yPHMcq9hJ8ZZW8Fc2NENWw1cS+4hJpiNEM3vBVanRBKAfczZR5 Odx4qGoDBatDR00dfNzlrpr3cvy66giNEbDv2APPMO8YD6rTeT0GyMXM gQ1SULHxAo3G8GmzEiAd6rplKA4tZ+TXIPHZqx8/5Nu6moizXntxGOCU 4egalBQoQKs=

感謝所有幫助和評論。我已經這樣做了大約一周但沒有運氣。

提前致謝。

K

相關內容