<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Don’t use DH1 (modp1024), it is too weak and Apple will refuse it<br><br><div id="AppleMailSignature" dir="ltr">Sent from mobile device</div><div dir="ltr"><br>On Jan 18, 2019, at 17:33, Mr. Jan Walter <<a href="mailto:hopping_hol@yahoo.com">hopping_hol@yahoo.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div class="ydp7e7cccd0yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><div dir="ltr">Same server, now hacking through the same config on the latest OSX:<br></div><div dir="ltr"><br></div><div dir="ltr">Set auth method to none, set certificate in that.<br></div><div dir="ltr">CA cert set in system keystore and marked as trusted, the client2 cert in the login key store, seemed to work according to the logs.</div><div dir="ltr">Set ExtSAN, so cert was generated as:<br></div><div dir="ltr"><br></div><div dir="ltr">certutil -S -c "<a href="http://ca.zzz.net">ca.zzz.net</a>" -n "<a href="http://client2.zzz.net">client2.zzz.net</a>" -s "O=Client2,CN=<a href="http://client2.zzz.net">client2.zzz.net</a>" -k rsa -v 12 -d sql:${HOME}/ca -t ",," -1 -6 -8 "<a href="http://client2.zzz.net">client2.zzz.net</a>" --extSAN ip:11.11.11.11<br></div><div dir="ltr"><br></div><div dir="ltr">with the IP being the internet-sided of the NAT IP for the client. Note that the -8 arg should set the DNS Altname. Does that need reverse DNS lookup working right or something?<br></div><div dir="ltr"><br></div><div dir="ltr">Server logs:<br></div><div dir="ltr">=====<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[1] 11.11.11.11: constructed local IKE proposals for ikev2-cp (IKE SA responder matching remote proposals): 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_512;INTEG=HMAC_SHA2_512_256;DH=MODP2048 2:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA2_512;INTEG=HMAC_SHA2_512_256;DH=MODP2048 3:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024 5:IKE:ENCR=AES_CBC_256,AES_CBC_128;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP1024<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[1] 11.11.11.11 #1: proposal 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024 chosen from remote proposals 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048 2:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=ECP_256 3:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP1536 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024[first-match] 5:IKE:ENCR=3DES;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[1] 11.11.11.11 #1: initiator guessed wrong keying material group (MODP2048); responding with INVALID_KE_PAYLOAD requesting MODP1024<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[1] 11.11.11.11 #1: responding to IKE_SA_INIT (34) message (Message ID 0) from 11.11.11.11:500 with unencrypted notification INVALID_KE_PAYLOAD<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[1] 11.11.11.11 #1: deleting state (STATE_PARENT_R0) aged 0.001s and NOT sending notification<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: packet from 11.11.11.11:500: deleting connection "ikev2-cp"[1] 11.11.11.11 instance with peer 11.11.11.11 {isakmp=#0/ipsec=#0}<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11: constructed local IKE proposals for ikev2-cp (IKE SA responder matching remote proposals): 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_512;INTEG=HMAC_SHA2_512_256;DH=MODP2048 2:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA2_512;INTEG=HMAC_SHA2_512_256;DH=MODP2048 3:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024 5:IKE:ENCR=AES_CBC_256,AES_CBC_128;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP1024<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: proposal 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024 chosen from remote proposals 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048 2:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=ECP_256 3:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP1536 4:IKE:ENCR=AES_CBC_128;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024[first-match] 5:IKE:ENCR=3DES;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1024<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: STATE_PARENT_R1: received v2I1, sent v2R1 {auth=IKEv2 cipher=AES_CBC_128 integ=HMAC_SHA1_96 prf=HMAC_SHA1 group=MODP1024}<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: certificate verified OK: O=Client2,CN=<a href="http://client2.zzz.net">client2.zzz.net</a><br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: No matching subjectAltName found<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: No matching subjectAltName found<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: IKEv2 mode peer ID is ID_IPV4_ADDR: '192.168.1.198'<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: Authenticated using RSA<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11: constructed local ESP/AH proposals for ikev2-cp (IKE_AUTH responder matching remote ESP/AH proposals): 1:ESP:ENCR=AES_GCM_C_256;INTEG=NONE;DH=NONE;ESN=DISABLED 2:ESP:ENCR=AES_GCM_C_128;INTEG=NONE;DH=NONE;ESN=DISABLED 3:ESP:ENCR=AES_CBC_256;INTEG=HMAC_SHA2_512_256;DH=NONE;ESN=DISABLED 4:ESP:ENCR=AES_CBC_128;INTEG=HMAC_SHA2_512_256;DH=NONE;ESN=DISABLED<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: no local proposal matches remote proposals 1:ESP:ENCR=AES_CBC_256;INTEG=HMAC_SHA2_256_128;ESN=DISABLED 2:ESP:ENCR=AES_CBC_256;INTEG=HMAC_SHA2_256_128;ESN=DISABLED 3:ESP:ENCR=AES_CBC_256;INTEG=HMAC_SHA2_256_128;ESN=DISABLED 4:ESP:ENCR=AES_CBC_128;INTEG=HMAC_SHA1_96;ESN=DISABLED 5:ESP:ENCR=3DES;INTEG=HMAC_SHA1_96;ESN=DISABLED<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: IKE_AUTH responder matching remote ESP/AH proposals failed, responder SA processing returned STF_FAIL+v2N_NO_PROPOSAL_CHOSEN<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #3: responding to IKE_AUTH message (ID 1) from 11.11.11.11:4500 with encrypted notification NO_PROPOSAL_CHOSEN<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #3: deleting other state #3 (STATE_CHILDSA_DEL) aged 0.008s and NOT sending notification<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: "ikev2-cp"[2] 11.11.11.11 #2: deleting state (STATE_IKESA_DEL) aged 0.057s and NOT sending notification<br></div><div dir="ltr">Jan 18 21:36:21 ip-10-0-0-194 pluto[14881]: packet from 11.11.11.11:4500: deleting connection "ikev2-cp"[2] 11.11.11.11 instance with peer 11.11.11.11 {isakmp=#0/ipsec=#0}<br></div><div dir="ltr">====<br></div><div dir="ltr"><br></div><div dir="ltr">Config file:<br></div><div dir="ltr">====<br></div><div dir="ltr"><span><div>conn ikev2-cp</div><div>    authby=rsasig</div><div>    ikev2=insist</div><div>    cisco-unity=yes</div><div>    # The server's actual IP goes here - not elastic IPs</div><div>    left=10.0.0.194</div><div>    leftsourceip=<a href="http://ip-of-vv.zzz.net">ip-of-vv.zzz.net</a></div><div>    leftcert=<a href="http://vv.zzz.net">vv.zzz.net</a></div><div>    <a href="mailto:leftid=@vv.zzz.net">leftid=@vv.zzz.net</a></div><div>    leftsendcert=always</div><div>    leftsubnet=0.0.0.0/0</div><div>    leftrsasigkey=%cert</div><div>    # try to structure something to accept this offer: IKE:ENCR=AES_CBC_256;INTEG=HMAC_SHA2_384_192;PRF=HMAC_SHA2_384;DH=MODP1024</div><div>    ike=aes256-sha2_512;modp2048,aes128-sha2_512;modp2048,aes256-sha1;modp1024,aes128-sha1;modp1024,aes-sha2;modp1024</div><div>    esp=aes_gcm256-null,aes_gcm128-null,aes256-sha2_512,aes128-sha2_512</div><div>    # Clients</div><div>    right=%any</div><div>    # your addresspool to use - you might need NAT rules if providing full internet to clients</div><div>    rightaddresspool=10.0.0.240-10.0.0.250</div><div>    rightca=%same</div><div>    rightrsasigkey=%cert</div><div>    narrowing=yes</div><div>    # recommended dpd/liveness to cleanup vanished clients</div><div>    dpddelay=30</div><div>    dpdtimeout=120</div><div>    dpdaction=clear</div><div>    auto=add</div><div>    rekey=no</div><div>    #ms-dh-fallback=yes</div><div>    #msdh-downgrade=yes</div><div>    ms-dh-downgrade=yes</div><div>    # ikev2 fragmentation support requires libreswan 3.14 or newer</div><div>    fragmentation=yes</div><div>    # optional PAM username verification (eg to implement bandwidth quota</div><div>    # pam-authorize=yes</div><div>===</div></span><br></div><div dir="ltr">I got to this configuration through a combination of:</div><div dir="ltr"><a href="https://dc77312.wordpress.com/2019/01/09/libreswan-ipsec-ikev2-vpn-on-rhel-8-beta-server-and-windows-10-client/" rel="nofollow" target="_blank">https://dc77312.wordpress.com/2019/01/09/libreswan-ipsec-ikev2-vpn-on-rhel-8-beta-server-and-windows-10-client/</a><br></div><div dir="ltr"><a href="https://libreswan.org/wiki/Configuration_examples" rel="nofollow" target="_blank">https://libreswan.org/wiki/Configuration_examples</a><br></div><div dir="ltr"><a href="https://lists.libreswan.org/pipermail/swan/2018/002902.html" rel="nofollow" target="_blank">https://lists.libreswan.org/pipermail/swan/2018/002902.html</a> (also in one of Paul's earlier emails)<br></div><div dir="ltr"><a href="https://github.com/libreswan/libreswan/issues/198" rel="nofollow" target="_blank">https://github.com/libreswan/libreswan/issues/198</a> discussion<br></div><div dir="ltr"><br></div><div dir="ltr">And found the right ms-dh-downgrade keyword in the source code.</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Cheers,<br></div><div dir="ltr"><br></div><div dir="ltr">Jan<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"> </div></div></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Swan mailing list</span><br><span><a href="mailto:Swan@lists.libreswan.org">Swan@lists.libreswan.org</a></span><br><span><a href="https://lists.libreswan.org/mailman/listinfo/swan">https://lists.libreswan.org/mailman/listinfo/swan</a></span><br></div></blockquote></body></html>