
私は、ike2 と aes256 暗号化を使用して、strongSwan VPN 経由で異なるゾーンにある 2 つの AWS サブネットを接続することができました。そのため、マスター CA キー、自己署名 CA 証明書、および両方のゲートウェイの秘密キーと公開キーが作成されました。その後、roadwarrior の証明書を作成し、p12 形式で win10 クライアントにエクスポートしました。
これら 2 つの LAN 間の接続は機能していますが、RoadWarrior クライアントを接続できません。
証明書を Windows 10 にインポートしましたが、通常は証明書マネージャーに表示されます。
次に、Windows10 VPN クライアントを使用して VPN 構成を作成し、それを実行すると、Windows から次のメッセージが表示されました。
この拡張認証プロトコルで使用できる証明書が見つかりませんでした。
チェックインはcertmagr
すべて所定の場所にあります。
使用される認証方法は EAP-tls であり、LAN 間モデルでは問題なく動作します。
Win10 VPN セキュリティ プロパティの設定は次のとおりです。
Type of the VPN: IKE2 , Data Encryption: Require encryption (disconnect if server declines) Authentication: Use Extensible Authentication Protocol -> Microsoft smart card or other certificates (encryption enabled) -> Properties ---> Use certificate on this computer ---> Verify the server's identity by validating the certificate ---> Trusted Root Certificate authority ----> Both certificates CA and the client p12 certificate are visible and checked
ここはipsec.confファイルファイル
config setup
charondebug="cfg 2, dmn 2, ike 2,net 2"
uniqueids=yes
strictcrlpolicy=no
conn %default
fragmentation=force
forceencaps=yes
rekeymargin=3m
mobike=no
keyingtries=%forever
ike=aes256-sha256-modp2048,aes256-sha2_256-modp1024!
esp=aes256-sh256,aes256-sha2_256!
ikelifetime=1h
lifetime=8h
dpddelay=30
dpdtimeout=120
dpdaction=restart
authby=pubkey
leftcert=vpn-west-public-certificate.pem
leftsendcert=always
keyexchange=ikev2
type=tunnel
leftca="C=DE, O=Orgname, CN=Orgname Root CA"
leftid=13.57.xx.yy
left=10.0.0.208
leftsubnet=10.0.0.0/16
conn roadw
right=%any
rightid=%any
rightauth=eap-tls
rightsourceip=10.0.0.64/28
rightsendcert=never
rightdns=8.8.8.8
eap_identity=%identity
auto=add
こちらはIPsec シークレットファイル
13.57.xx.yy : RSA "/etc/ipsec.d/private/vpn-west-private-key.pem"
username : EAP "passphrase"
CA ルートと username.p12 がクライアントにインストールされています。Linux と Windows の両方で何らかの調整が行われていると思われます。
さらに、Windows では、パブリック サーバー証明書の作成時に、ホスト名または IP アドレスを ipsec pki --issuer 引数の一部として --san dns:13.57.xx.yy の形式でリストする必要があり、クライアント (Windows) ユーザー証明書には CN=$USER" --san $USER が必要であることがわかりました。両方のパラメーターを追加しましたが、それでも動作に変化はありません。
extKeyUsage を追加する必要がありますか? OID は 1.3.6.1.5.5.7.3.2 である必要があります。追加しても何も変わりません。
どこから始めればよいか、何かアイデアはありますか。Windows10 はセッションを開始していないようです。そのため、Win10 の VPN クライアントの構成に問題があるように見えます。また、strongSwan 側でもいくつかのパラメータを調整する必要があります。
CA、サーバー、クライアントの証明書設定コマンドは次のとおりです。
ルートマスターキー
ipsec pki --gen --type rsa --size 4096 --outform > root-key-for-ca=signing.pem
ルートCA証明書
ipsec pki --self --ca --lifetime 3650 --in root-key-for-ca=signing.pem --type rsa --dn "C=DE, O=Orgname Root CA" --outform pem > signed-root-ca-certificate.pem
クライアントの秘密鍵
ipsec pki --gen --type rsa --size 2048 --outform pem > win10-client1-key.pem
クライアント公開証明書
ipsec pki --pub --in win10-client1-key.pem --type rsa | ipsec pki --issue --lifetime 730 --cacert signed-root-ca-certificate.pem --cakey root-key-for-ca-signing.pem --dn "C=DE, O=Orgname, CN=win10-client1" --san "win10-client1" --flag serverAuth --flag clientAuth --flag ikeIntermediate --outform pem > vpn-win10-client1-public-certificate.pem
クライアントの個人秘密鍵を転送するためのP12ポータブルフォーマット
openssl pkcs12 -export -inkey win10-client1-key.pem -in vpn-win10-client1-public-certificate.pem -name "win10-client1 VPN certificate" -certfile signed-root-ca-certificate.pem -cname "Orgname Root CA" -out win10-client1.p12
プライベートサーバーキー
ipsec pki --gen --type rsa --size 2048 --outform pem > vpn-west=private-key.pem
パブリックサーバー証明書
ipsec pki --pub --in vpn-west-private-key.pem --type rsa | ipsec pki --issue --lifetime 730 --cacert signed-root-ca-certificate.pem --cakey root-key-for-ca-signing.pem --dn "C=DE, O=Orgname, CN=13.57.xx.yy" --san 13.57.xx.yy --san dns:13.57.xx.yy --flag serverAuth --flag ikeIntermediate --outform pem > vpn-west-public-certificate.pem