Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    <Solved> - IPsec IkeV2 Cisco ASA will ony activate first P2 SA

    Scheduled Pinned Locked Moved IPsec
    2 Posts 2 Posters 821 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bingo600B
      bingo600
      last edited by bingo600

      To get some experience with pfSense IPsec , i was toying around with pfSense IPsec , and a little Cisco ASA 5506X

      I have selected to install an extra pfSense as an "IPsec terminating box", and do static routes to/from the main pfSense via an "Interconnect DMZ" , connected to both fwall's.

      I basically followed this guide for the ASA
      https://www.petenetlive.com/KB/Article/0001429

      pfSense setup straight "out of the box" , on both P1 & P2 Setup.
      I used most as default ...

      I have 3 P2's defining 3 different PBX subnets behind the main pfSense.

      P1
      e029324a-17bb-46c8-bf31-dacb9343fc31-image.png

      P2
      eb993df1-691f-4f6e-b69e-88aa9feebc4a-image.png

      The other two P2's setup same way , just other "Network lan's"

      "Everyhing" worked fine for the first P2.
      My Cisco phones (behind the ASA) connected to the PBX behind the main pfSense.

      But i couldn't activate the other P2's.

      It turned out that the above ASA example missed one command on the ASA

      This one:

      crypto map CRYPTO-MAP 1 set pfs group19 
      

      After adding that one , all 3 P2's would activate.

      But why did the first P2 activate without that command ???
      Is there some default/special handling of the first P2 ?

      Working ASA IPSEC commands

      !
      object network partner-local                                                                                                                                                                                         
       subnet 10.259.2.0 255.255.255.0                                                                                                                                                                                     
      object network telelab-remote-cisco                                                                                                                                                                                  
       subnet 192.168.8.0 255.255.255.0                                                                                                                                                                                    
      object network telelab-remote-pbx1                                                                                                                                                                                   
       subnet 10.13.6.0 255.255.255.0                                                                                                                                                                                    
      object network telelab-remote-avaya                                                                                                                                                                                  
       subnet 10.13.7.0 255.255.255.0                                                                                                                                                                                    
      object-group network telelab-remote                                                                                                                                                                                  
       network-object object telelab-remote-cisco                                                                                                                                                                          
       network-object object telelab-remote-pbx1                                                                                                                                                                           
       network-object object telelab-remote-avaya                                                                                                                                                                          
      access-list crypto-to-telelab extended permit ip object partner-local object-group telelab-remote 
      !
      !
      crypto ikev2 policy 10
       encryption aes-256
       integrity sha256
       group 19
       prf sha256
       lifetime seconds 86400
      crypto ikev2 enable outside
      !
      
      ikev2 local-authentication pre-shared-key
      
      !
      tunnel-group <remote peer ip> type ipsec-l2l
      tunnel-group <remote peer ip> ipsec-attributes
      ikev2 remote-authentication pre-shared-key 0 <super secret key>
      ikev2 local-authentication pre-shared-key 0 <super secret key>
      isakmp keepalive threshold 10 retry 2
      !
      crypto ipsec ikev2 ipsec-proposal VPN-TRANSFORM
       protocol esp encryption aes-256
       protocol esp integrity sha-256
      !
      crypto map CRYPTO-MAP 1 match address  crypto-to-telelab 
      crypto map CRYPTO-MAP 1 set pfs group19    
      crypto map CRYPTO-MAP 1 set peer <remote peer ip>
      crypto map CRYPTO-MAP 1 set ikev2 ipsec-proposal VPN-TRANSFORM
      crypto map CRYPTO-MAP interface outside
      !
      

      /Bingo

      If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

      pfSense+ 23.05.1 (ZFS)

      QOTOM-Q355G4 Quad Lan.
      CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
      LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

      jimpJ 1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate @bingo600
        last edited by

        @bingo600 said in <Solved> - IPsec IkeV2 Cisco ASA will ony activate first P2 SA:

        But why did the first P2 activate without that command ???
        Is there some default/special handling of the first P2 ?

        Yes, there is.

        When connecting, the first P2 SA entry uses DH information from the parent P1, and not its own PFS value. This isn't specific to pfSense, it's part of how IPsec operates.

        It will use the P2 PFS value for the additional P2 entries and also when rekeying, so it may have failed to stay established over time as well.

        You'll see this sometimes on the IPsec status when a tunnel connects first and it doesn't show the PFS value in the P2 status for the first configured P2 initially, but it will after a while when the tunnel rekeys.

        Remember: Upvote with the šŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.