Win 10 roadwarrior를 AWS StrongSwan VPN에 연결 - 확장 가능 인증 프로토콜에 사용할 수 있는 인증서를 찾을 수 없습니다

Win 10 roadwarrior를 AWS StrongSwan VPN에 연결 - 확장 가능 인증 프로토콜에 사용할 수 있는 인증서를 찾을 수 없습니다

aes256 암호화와 함께 ike2를 사용하여 StrongSwan VPN을 통해 서로 다른 영역에 있는 두 개의 AWS 서브넷을 연결했습니다. 따라서 마스터 CA 키가 생성되고 자체 서명된 CA 인증서와 두 게이트웨이 모두에 대한 개인 및 공개 키가 생성됩니다. 그 후, roadwarrior용 인증서를 생성하고 이를 p12 형식으로 win10 클라이언트로 내보냈습니다.

두 LAN 간의 연결이 작동 중이지만 roadwarrior 클라이언트를 연결할 수 없습니다.

인증서를 win10으로 가져왔고 일반적으로 인증 관리자에 표시됩니다.

그런 다음 Windows10 VPN 클라이언트를 사용하여 VPN 구성을 만들었고 이를 실행하면 Windows 메시지에서 다음과 같은 메시지를 받았습니다.

이 확장 가능 인증 프로토콜과 함께 사용할 수 있는 인증서를 찾을 수 없습니다.

체크인은 certmagr모두 제자리에서 이루어집니다.

사용된 인증방식은 EAP-tls이며 LAN to 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에서는 공용 서버 인증서 생성 중에 --san dns:13.57.xx.yy 형식의 ipsec pki -- 발급자 인수의 일부로 호스트 이름 또는 IP 주소를 나열해야 하며 클라이언트(windows)도 필요하다는 사실을 발견했습니다. 사용자 인증서에는 CN=$USER" --san $USER가 있어야 합니다. 두 매개변수를 모두 추가했지만 여전히 동작에는 변화가 없습니다.

extKeyUsage를 추가해야 합니까? OID를 추가해도 아무 것도 변경되지 않았기 때문에 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

관련 정보