FortiGate環境で”This Connection is Invalid. SSL certificate expired.”を食らった


会社からアクセスしてみたようとしたら「This Connection is Invalid. SSL certificate expired.」というエラーがでてアクセスできなかった。

最初、サーバ側の問題なのかと思って調査を開始したところletsencrypt.orgにアクセスした場合にも同じエラーが・・・

さすがにこれはおかしいな、とスマホからLTE回線で確認してみたらどちらもアクセス可能。

これは???と思ってよくよくエラー内容を見直してみる…

FortiNetのアイコンじゃん

というわけで対処方法がFortiNetのページにありました「Fortinet and Expiring Let’s Encrypt Certificates

上記記載の内容を下記に引用する。

Workaround 1 – Prevent fallback to the expired Root CA

With the removal of the expired IdenTrust DST Root CA X3 in Certificate Bundle version 1.28, it is possible to prevent fallback to the expired root CA by blocking FortiGate access to apps.identrust.com, resulting in the correct root CA being used. This can be achieved by using either DNS blackholing or via an FQDN policy to block access to apps.identrust.com.

This will force the FortiGate device to rebuild the certificate chain and find the ISRC Root X1 Root CA Cert in the local certificate in the store.

config system dns-database
    edit "1"
        set domain "identrust.com"
        config dns-entry
            edit 1
                set hostname "apps"
                set ip 127.0.0.1
            next
        end
    next
end

Workaround 2 – Accept the expired certificates

For third-party sites outside of your control, customers can turn off this certificate expiration validation using the following CLI as a temporary workaround:

config firewall ssl-ssh-profile
  edit "certificate-inspection"
    config https
      set expired-server-cert allow 
      set untrusted-server-cert allow
end

FortiGateのコマンドで、期限切れとなっている証明書の取り扱い手法を変える、というものになっている。

今後のFortiGateの新firmwareで、もうちょっとスマートな回避方法の提供を計画しているとのこと。

今回の問題について、該当環境の管理者に確認したところworkaround2の手法で対処した、とのこと。