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

    HEADS UP: IPsec Changes

    Scheduled Pinned Locked Moved CE 2.6.0 Development Snapshots (Retired)
    5 Posts 2 Posters 1.5k 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.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by jimp

      I just committed a significant set of IPsec changes which change IPsec in some fundamental ways. Some of which are not user-visible, others which are.

      The most significant thing to watch out for is to ensure that assigned IPsec VTI interface names are updated appropriately on upgrade.

      Highlights of changes:

      • VTI changes
        • VTI Interface name format has changed (again)
          • Upgrade code will update assignments appropriately, but if the old names were hardcoded in custom/manual settings somewhere, users will need to adjust them appropriately.
        • Interface names are now ipsecY where Y is the P2 reqid which is unique and constant
        • The reqid in config.xml and for connection names is a low number (e.g. 24) but when applied in the strongSwan configuration and interface it is 5000+reqid so 5024 in this example
          • High enough to avoid conflicts with reqid values dynamically allocated by strongSwan (See https://redmine.pfsense.org/issues/12155 )
          • Low enough to not approach upper limits on FreeBSD interface names (max is ipsec32767) or FreeBSD reqid values (16383)
      • IPsec configuration
        • Vast speed improvement when applying IPsec settings ( https://redmine.pfsense.org/issues/12026 )
        • P1 information is shown when editing a P2, along with a link to the relevant P1
        • Slight reorganization of some P1 and P2 sections
        • IKE ID and reqid values are shown in the GUI in the tunnel list and when editing to assist in matching log and status information
        • strongSwan configuration changes
          • Changed internal connection names to a more easily identified pattern (conX for P1, conX_Y for P2 when split, X=IKE ID, Y=reqid)
            • This means it's easy to always find the correct matching entry in config.xml without having to match in other ways.
            • Helps with issues such as https://redmine.pfsense.org/issues/11910
          • Added comments in swanctl.conf for P1/P2 descriptions
      • IPsec status
        • Vast speed improvement on IPsec status ( https://redmine.pfsense.org/issues/11951 )
        • Fixed issues with P1 descriptions not matching properly ( https://redmine.pfsense.org/issues/11910 )
        • Shows P2 descriptions where possible
        • Shows disconnected P2 entries ( https://redmine.pfsense.org/issues/6275 )
        • Shows count of both connected and disconnected P2s
        • Improvements to connect/disconnect functionality
        • Links to P1/P2 edit screens from status entries
        • Status output is sorted
        • Connect and disconnect buttons now use AJAX
      • IPsec Widget
        • Widget output redesigned to show better statistics and information
        • Active and total counts for P1, P2, and Mobile leases
        • Full listing of P1/P2 entries with AJAX connect/disconnect buttons ( https://redmine.pfsense.org/issues/2456 )
      • Various other code optimizations and speed improvements in IPsec

      This should make it into snapshots soon. If you have problems with IPsec on snapshots, please start a new thread to discuss and diagnose the issues.

      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 3
      • jimpJ jimp pinned this topic on
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by jimp

        Widget change screenshots

        329c7fc5-b444-42b9-9c86-5a28ba198928-image.png

        66c68297-0626-4bd6-82b8-b3effc4f9c77-image.png

        Status page changes

        daafc116-a7fc-442f-8227-6f5de6b73351-image.png

        P2 Editing

        dbb5206c-0bf5-4d7b-927f-209cdfb0174a-image.png

        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!

        JeGrJ 1 Reply Last reply Reply Quote 1
        • JeGrJ
          JeGr LAYER 8 Moderator @jimp
          last edited by

          @jimp The widget, status and settings options seem to have gotten a bit of love like the wireguard UI by @cmcdonald brought into play and I sincerely hope some of those ideas/changes will get into other parts of IPSec and OpenVPN(!) as well, as those are really good and bring more overview and usability (e.g. interface assignment or quick editing ones!) But great job so far!

          That said, on your status page screenshot: the first P2 entry (LAN to Missy LAN) - could it be that in the first P2 of any VPN there's always the MODP setting missing? All other P2s show it just fine. I just spotted the same on a few of our current 2.5.x deployments too and was always wondering if that's some limitation or just a UI bug?

          Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

          If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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

            @jegr said in HEADS UP: IPsec Changes:

            That said, on your status page screenshot: the first P2 entry (LAN to Missy LAN) - could it be that in the first P2 of any VPN there's always the MODP setting missing? All other P2s show it just fine. I just spotted the same on a few of our current 2.5.x deployments too and was always wondering if that's some limitation or just a UI bug?

            That fun quirk is a part of how IPsec works, not a bug. First P2 uses the MODP from IKE. Additional P2s or rekeys use the MODP from child SA. Comes up from time to time but not so much I've added it to the docs.

            I could probably auto-fill that from the P1 but I'm not sure if that would be helpful since it's not technically correct and may confuse someone if they see the "wrong" value there.

            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!

            JeGrJ 1 Reply Last reply Reply Quote 1
            • JeGrJ
              JeGr LAYER 8 Moderator @jimp
              last edited by JeGr

              @jimp Huh! That's one of the times I'm glad to have asked as that has totally evaded me for years. Thanks for clarifying, always thought it to be a display/UI glitch as the phase was working anyways. Never thought much of it, but great thinking to add that to the docs, I'm sure there are quite a few who are thinking that being a bug! Big thumb up!

              One little additional question: is that only for IKEv2? As for IKEv1 I remember all phases to show e.g. MODP_4096 etc. that was why I though of it being a bug in the first place?

              Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

              If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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