Trying to configure IPsec for IOS 13.3.1, fails with "Negotiation with the VPN server failed"



  • I'm probably doing a stupid user error, so I apologize in advance! First time I've tried this.

    In trying to set up pfSense "2.4.4-RELEASE-p3 (amd64)" on IOS 13.3.1 (iPhone), I followed the directions at Netgate. Note that pfSense 2.4.4 didn't EXACTLY match what the instructions were saying, but they were pretty close.

    When I try and bring up the VPN connection, I get: "Negotiation with the VPN server failed."

    Logs follow. Any advice or suggestions would be greatly appreciated, thanks!

    Mar 2 11:19:12 	charon 		01[ENC] <17> generating INFORMATIONAL_V1 request 4279946569 [ N(NO_PROP) ]
    Mar 2 11:19:12 	charon 		01[NET] <17> sending packet: from 50.47.113.45[500] to 174.216.20.149[7717] (56 bytes)
    Mar 2 11:19:12 	charon 		01[IKE] <17> IKE_SA (unnamed)[17] state change: CONNECTING => DESTROYING
    Mar 2 11:19:12 	charon 		01[NET] <18> received packet: from 174.216.20.149[7717] to 50.47.113.45[500] (775 bytes)
    Mar 2 11:19:12 	charon 		01[ENC] <18> parsed AGGRESSIVE request 0 [ SA KE No ID V V V V V V V V V V V V V V ]
    Mar 2 11:19:12 	charon 		01[CFG] <18> looking for an IKEv1 config for 50.47.113.45...174.216.20.149
    Mar 2 11:19:12 	charon 		01[CFG] <18> candidate: %any...%any, prio 24
    Mar 2 11:19:12 	charon 		01[CFG] <18> candidate: 50.47.113.45...%any, prio 1052
    Mar 2 11:19:12 	charon 		01[CFG] <18> found matching ike config: 50.47.113.45...%any with prio 1052
    Mar 2 11:19:12 	charon 		01[IKE] <18> received FRAGMENTATION vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received NAT-T (RFC 3947) vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-08 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-07 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-06 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-05 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-04 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-03 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-02 vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received draft-ietf-ipsec-nat-t-ike-02\n vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received XAuth vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received Cisco Unity vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> received DPD vendor ID
    Mar 2 11:19:12 	charon 		01[IKE] <18> 174.216.20.149 is initiating a Aggressive Mode IKE_SA
    Mar 2 11:19:12 	charon 		01[IKE] <18> IKE_SA (unnamed)[18] state change: CREATED => CONNECTING
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable INTEGRITY_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable INTEGRITY_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> selecting proposal:
    Mar 2 11:19:12 	charon 		01[CFG] <18> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 11:19:12 	charon 		01[CFG] <18> received proposals: IKE:AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:AES_CBC_256/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024, IKE:AES_CBC_128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:AES_CBC_128/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024, IKE:3DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:3DES_CBC/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024, IKE:DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:DES_CBC/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024
    Mar 2 11:19:12 	charon 		01[CFG] <18> configured proposals: IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048
    Mar 2 11:19:12 	charon 		01[IKE] <18> no proposal found
    Mar 2 11:19:12 	charon 		01[IKE] <18> queueing INFORMATIONAL task
    Mar 2 11:19:12 	charon 		01[IKE] <18> activating new tasks
    Mar 2 11:19:12 	charon 		01[IKE] <18> activating INFORMATIONAL task
    Mar 2 11:19:12 	charon 		01[ENC] <18> generating INFORMATIONAL_V1 request 979376487 [ N(NO_PROP) ]
    Mar 2 11:19:12 	charon 		01[NET] <18> sending packet: from 50.47.113.45[500] to 174.216.20.149[7717] (56 bytes)
    Mar 2 11:19:12 	charon 		01[IKE] <18> IKE_SA (unnamed)[18] state change: CONNECTING => DESTROYING 
    


  • I have this config working here.

    ios13.JPG
    ios132.JPG



  • @egoisst That was super useful, thanks for the help! Unfortunately, though, it got me a little farther, but now I fail with "User authentication failed."

    I have a long (random) password cut/pasted in, and the secret key is correct as well.

    In terms of the user setting, the user is NOT a member of admins. Then, further down, my effective privilege is User - VPN: IPsec xauth Dialin. No user cert, no authorized key, and it doesn't seem to matter if I put the IPsec Pre-Shared key in the user record, it fails either way.

    Any secrets as to how you set up the user? Any tips on how you set up the VPN under IOS?

    Thanks so much for your help! I'm closer, but not quite there.

    Finally, I thought that the SHA1 hash was insecure. Is that still safe to use here in IPsec? Can a different hash be used?

    Thanks again!



  • Hahaha,
    struggled with that a bit too ;-)

    You should create a VPN Group and add the VPN Users.
    The default admin Group is not enought!

    user1.JPG

    user 2.JPG

    IMG_0753.PNG



  • Okay, after making the group changes (and rebooting), I now get a longish delay and finally get "Negotiation with the VPN server failed." I was going to post all of my WWW pages, but I can't see how you're doing that? What steps are you doing to post pfSense WWW configuration pages here in this forum?

    I've gone through all the screens you posted, and I'm pretty sure I have everything correct. It doesn't seem to matter if I put the IPsec Pre-Shared Key in the user record or not, it fails both ways (although I did note that you didn't have it there).

    I'm wondering if there's some other screen that I'm missing? Perhaps VPN->IPsec, Mobile Clients tab?

    I'll include the current log here, in case that helps. If you can tell me how to post pfSense setting screens to this forum, I'll be happy to copy my exact configuration.

    Thanks so much for your patience and hand holding in getting me going here!

    Mar 2 13:04:43 	charon 		05[IKE] <con-mobile|1> IKE_SA con-mobile[1] state change: ESTABLISHED => DELETING
    Mar 2 13:04:43 	charon 		05[IKE] <con-mobile|1> IKE_SA con-mobile[1] state change: DELETING => DELETING
    Mar 2 13:04:43 	charon 		05[IKE] <con-mobile|1> IKE_SA con-mobile[1] state change: DELETING => DESTROYING
    Mar 2 13:04:43 	charon 		05[NET] <2> received packet: from 174.216.20.149[7712] to 50.47.113.45[500] (775 bytes)
    Mar 2 13:04:43 	charon 		05[ENC] <2> parsed AGGRESSIVE request 0 [ SA KE No ID V V V V V V V V V V V V V V ]
    Mar 2 13:04:43 	charon 		05[CFG] <2> looking for an IKEv1 config for 50.47.113.45...174.216.20.149
    Mar 2 13:04:43 	charon 		05[CFG] <2> candidate: %any...%any, prio 24
    Mar 2 13:04:43 	charon 		05[CFG] <2> candidate: 50.47.113.45...%any, prio 1052
    Mar 2 13:04:43 	charon 		05[CFG] <2> found matching ike config: 50.47.113.45...%any with prio 1052
    Mar 2 13:04:43 	charon 		05[IKE] <2> received FRAGMENTATION vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received NAT-T (RFC 3947) vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-08 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-07 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-06 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-05 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-04 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-03 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-02 vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received draft-ietf-ipsec-nat-t-ike-02\n vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received XAuth vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received Cisco Unity vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> received DPD vendor ID
    Mar 2 13:04:43 	charon 		05[IKE] <2> 174.216.20.149 is initiating a Aggressive Mode IKE_SA
    Mar 2 13:04:43 	charon 		05[IKE] <2> IKE_SA (unnamed)[2] state change: CREATED => CONNECTING
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable DIFFIE_HELLMAN_GROUP found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable INTEGRITY_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> selecting proposal:
    Mar 2 13:04:43 	charon 		05[CFG] <2> no acceptable ENCRYPTION_ALGORITHM found
    Mar 2 13:04:43 	charon 		05[CFG] <2> received proposals: IKE:AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:AES_CBC_256/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024, IKE:AES_CBC_128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:AES_CBC_128/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024, IKE:3DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:3DES_CBC/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024, IKE:DES_CBC/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024, IKE:DES_CBC/HMAC_MD5_96/PRF_HMAC_MD5/MODP_1024
    Mar 2 13:04:43 	charon 		05[CFG] <2> configured proposals: IKE:AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_2048
    Mar 2 13:04:43 	charon 		05[IKE] <2> no proposal found
    Mar 2 13:04:43 	charon 		05[IKE] <2> queueing INFORMATIONAL task
    Mar 2 13:04:43 	charon 		05[IKE] <2> activating new tasks
    Mar 2 13:04:43 	charon 		05[IKE] <2> activating INFORMATIONAL task
    Mar 2 13:04:43 	charon 		05[ENC] <2> generating INFORMATIONAL_V1 request 2858304773 [ N(NO_PROP) ]
    Mar 2 13:04:43 	charon 		05[NET] <2> sending packet: from 50.47.113.45[500] to 174.216.20.149[7712] (56 bytes)
    Mar 2 13:04:43 	charon 		05[IKE] <2> IKE_SA (unnamed)[2] state change: CONNECTING => DESTROYING
    


  • @jeffc

    If you can tell me how to post pfSense setting screens to this forum, I'll be happy to copy my exact configuration.

    Take a screenshot and drag it into the message window.



  • Hi @NogBadTheBad Thanks for the suggestion!

    I'll include all of my configuration screens (let me know if I missed anything), in case this helps to diagnose my issue":

    • Firewall screen:

    Firewall.png

    • IPsec Settings, Phase 1: (Note that I did change the pre-shared key)

    Phase 1A.png

    Phase 1B.png

    • IPsec Settings, Phase 2:

    Phase 2.png

    • IPsec Settings, Mobile Clients:

    Mobile Clients.png

    • User Settings:

    Users.png

    • And finally, Group Settings:

    Groups.png

    Thanks in advance for help in diagnosing my issue! If you need the current log, the one I posted before this would still be relevant.



  • Can you try DH Group 2 (1024 bit) in Phase 1.



  • Sorry for the delay. I did try changing the DH group to 2 (1024 bit) in phase 1, and that has no obvious affect. I still get Negotiation with the VPN server failed.

    Any other suggestions? Thanks again for your willingness to help me with this, I really appreciate it!

    In case it helps, here's my settings screen on the iPhone:

    IMG_5730132E120B-1.jpeg

    If I drill down into the pfSense VPN configuration:

    IMG_30679D85AAED-1.jpeg

    And, finally, when I try and launch the VPN:

    IMG_1432.PNG





  • @NogBadTheBad I'm using IKEv1 for two reasons:

    • A doc that I found specified using that for mobile iPhone access,
    • That was also recommended in @egoisst posts, so I didn't change that.

    Given that it's not working, I'm happy to try something else. This requires certs, though? I guess I'm okay with that, but it's an extra step I haven't currently done. Is that mandatory for EAP-MSChapv2?

    I'll give this a try in a bit and see if it helps ... thanks!


Log in to reply