You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mountain Lion (10.8) certificates-based L2TP over IPsec VPN kaput

After upgrading to Mountain Lion, my certificates-based L2TP over IPsec VPN stopped working. However, it works fine using a PSK instead of certificates. OSX 10.7, as well as Windows clients have no trouble with the certificates. For OSX 10.8, the VPN server is complaining the payload is faulty. So, since this works fine for OSX 10.7 and Windows clients, I have to conclude that the Mac client is mangling the certificate payload in 10.8.


In the Mac logs, I see the same as the user in this thread: https://discussions.apple.com/thread/4139538?answerId=19058470022#19058470022 . I have also followed the suggested solution in that thread of allowing all applications access to the private key in the Keychain, to no avail, the issue persists and the logs are unchanged.


Any ideas?


Cheers.

MacBook Pro, OS X Mountain Lion

Posted on Jul 30, 2012 11:48 AM

Reply
33 replies

Sep 22, 2012 12:33 AM in response to 3g91ld3a

Hi to all...

Problem solved! Because OSX and IOS have the same problem, i dived into the deep of IKE and found

the solution.

The problem is, that the new IPSEC system has problems with handling "big" certificates (search for

IKE UDP fragmentation, if you are interested in).

So, the solution is quiet simple- create a certificate with the absolute MINIMUM of the required data

(for Example: C=AT, CN=HS, E=hs). I tested only with 1024Bit Public Key size- and this works on

IOS and OSX as well.


Habe fun,


Harald

Sep 24, 2012 6:27 AM in response to christophefrom25

Hi,

This could NOT be solved within the keychain.The certificate has to be issued in a way, that its size

is so small, that it will be not fragmented during IKE negotiation.

If your certificate is issued by an IT administrator, tell him, that You need a certificate, where the

required fields (normally EMail and Common Name) should be as short as possible to reduce

the size of the certificate.


Harald

Feb 3, 2013 5:28 AM in response to 3g91ld3a

Yes, I am still watching this thread!


For every OSX update released I'm hoping for a fix for this bug, but so far nothing.

Poorly managed Apple!


What is even more annoying is that it was an Apple update on OSX 10.7 that forced me to rebuild my internal PKI infrastructure from 512 to 2048 certificate Key Size:


http://support.apple.com/kb/HT5281


(After this update, certificates with a Key Size less then 1024 was rejected)

Feb 24, 2013 2:02 AM in response to beamzz

Hi, i have the same problem, and debugged it in depth.

I use 2048 bit ssl certs.

Iphone and ipad both work with these certificates, so there must be a difference in the racoon source.

First i enabled the debugging at file: /etc/racoon/racoon.conf


(be sure,that racoon is not running, or you will get err (61). Reboot to fix)


added:

path logfile "/var/log/racoon.log";

log debug2;


did as root:

touch /var/log/racoon.log

chown root:admin /var/log/racoon.log

chmod 640 /var/log/racoon.log


So the error at the end after hashing the cert:

2013-02-24 10:48:51: [483] DEBUG: hmac(hmac_sha1)

2013-02-24 10:48:51: [483] DEBUG: HASH (init) computed:

2013-02-24 10:48:51: [483] DEBUG:

4c36a99e e9ddb045 03d54006 92b5c9ff c9732e72

2013-02-24 10:48:51: [483] ERROR: error -25308 errSecInteractionNotAllowed.

2013-02-24 10:48:51: [483] ERROR: failed to sign.

2013-02-24 10:48:51: [483] ERROR: failed to get sign2013-02-24 10:48:51: [483] ERROR: failed to allocate send buffer2013-02-24 10:48:51: [483] ERROR: failed to process packet.

2013-02-24 10:48:51: [483] ERROR: phase1 negotiation failed.

2013-02-24 10:48:51: [483] DEBUG: IV freed


The CA cert and the client are are trusted. (verified in the keystore, showing valid cert)


I also played around with turning dpd off, and ike_frag to on.

No change. Seems like the dog bytes in his tail.


Any updates in this issue ?


Rgds.

Frank

Mountain Lion (10.8) certificates-based L2TP over IPsec VPN kaput

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.