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

    site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working

    IPsec
    3
    17
    1.8k
    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.
    • getcomG
      getcom
      last edited by

      Following setup was given from the Cisco admin:

      IKE: IKEv2
      Authentication: pre-shared key
      Diffie Hellmann: Group 20 (nist ecp384)
      Encryption: 256-bit AES (aes-cbc-256)
      Hash: SHA-256
      Lifetime (sec): 86400

      IPSec
      Transform Type: ESP
      Encryption: AES-256
      Hash: SHA-256
      SA Lifetime: 3600
      Perfect Forward Secrecy (PFS): Group 20 (nist ecp384)

      Local network is 10.242.62.128/26 (VLAN 101)
      Remote network is 172.18.0.0/21
      I created a pre-shared key and send it to the Cisco admin.

      Phase 1 is connecting, phase 2 is not.
      IPsec log:
      c65cf058-ee6e-4391-bcae-731a1eba3939-grafik.png

      It does not find the IKE config. What could be the root cause?
      This is the first time trying to connect to a Cisco router, all other site-2-site VPNs between pfSense boxes are running without any issue.
      Has anybody a running site-2-site IPSec IKEv2 VPN to this kind of Cisco routers? Is there anything special?

      K 1 Reply Last reply Reply Quote 0
      • K
        Konstanti @getcom
        last edited by Konstanti

        @getcom said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

        IKE: IKEv2
        Authentication: pre-shared key

        hi
        You need to check the settings on both sides of the tunnel, they must be identical
        For example, I see

        Following setup was given from the Cisco admin:
        IKE: IKEv2

        and Cisco is trying to establish an IKEv1 connection

        28abcbb1-40ff-422e-8f87-d9256e9a0c4e-image.png

        getcomG 1 Reply Last reply Reply Quote 0
        • getcomG
          getcom @Konstanti
          last edited by

          @Konstanti

          I assume that "...looking for an IKEv1 config..." is a fallback on pfSense side.

          On Cisco they setup this which includes IKEv2:
          From my perspective they should change that here to: set transform-set esp-sha-hmac esp-aes 256 which they denied (argument was "It works like this everywhere...")

          0aa550a1-c6f2-4cbe-bb82-4de2d5ff38e2-grafik.png

          additional they have a generic protocol definition:

          eb44fc70-561a-4c6c-b129-696ee663e8d8-grafik.png

          The Cisco log:

          5c71439d-0683-4c1e-acdb-555df915c9fc-grafik.png

          Debug log on pfSense side:

          24566448-b673-4936-ae12-f841068e9f85-grafik.png

          Phase 1:

          7c6445ed-3c94-4555-b82b-6db0b1587a01-grafik.png

          Phase 2:

          d98ee13e-329d-4eb1-bca2-627e58d5cb3a-grafik.png

          V 1 Reply Last reply Reply Quote 0
          • V
            viragomann @getcom
            last edited by

            @getcom
            Is your identifier in the phase 1 equal to the IP behind the "remote" of the Cisco log?

            Is your pfSense behind a NAT router?
            If so try to force "NAT Traversal" in P1.

            getcomG 1 Reply Last reply Reply Quote 0
            • getcomG
              getcom @viragomann
              last edited by

              @viragomann said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

              @getcom
              Is your identifier in the phase 1 equal to the IP behind the "remote" of the Cisco log?

              Yes, it is identical. Phase 1 is working.

              Is your pfSense behind a NAT router?

              No, the pfSense is directly connected (PPPoE).

              If so try to force "NAT Traversal" in P1.

              This does not make sense here.

              V 1 Reply Last reply Reply Quote 0
              • V
                viragomann @getcom
                last edited by

                @getcom
                Did you try to enhance the log level?

                I had to troubleshoot an "N(TS_UNACCEPT) N(TS_UNACCEPT)" response from the remote site too in the past. After enhancing the log level, pfSense logged things like "proposing traffic selectors for us: " and "proposing traffic selectors for other: ", which differ. With this output, the remote admin believed me then, that the failure is on his site. ^^

                getcomG 1 Reply Last reply Reply Quote 0
                • getcomG
                  getcom @viragomann
                  last edited by getcom

                  @viragomann said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

                  @getcom
                  Did you try to enhance the log level?

                  I had to troubleshoot an "N(TS_UNACCEPT) N(TS_UNACCEPT)" response from the remote site too in the past. After enhancing the log level, pfSense logged things like "proposing traffic selectors for us: " and "proposing traffic selectors for other: ", which differ. With this output, the remote admin believed me then, that the failure is on his site. ^^

                  I have this already done for IKE SA and IKE Child SA. What did you additionally enhance? Message encoding?

                  cc6698ab-a152-42c4-b07b-0842f580851a-grafik.png

                  V K 2 Replies Last reply Reply Quote 0
                  • V
                    viragomann @getcom
                    last edited by viragomann

                    @getcom
                    I don't know anymore. That war 2 y ago.

                    Maybe the docs can help: Troubleshooting IPsec VPNs

                    I would try "Configuration backend", because the helpful entries were logged with "[CFG]".

                    1 Reply Last reply Reply Quote 0
                    • K
                      Konstanti @getcom
                      last edited by

                      @getcom

                      Hi, you have an error with traffic selectors (TS) on the Cisco side when establishing PHASE-2 , which is strange, since everything seems to be configured correctly, both the access list and the reverse mask. If possible, show the entire connection log on the PF side (phase-1 and phase-2)

                      getcomG 1 Reply Last reply Reply Quote 0
                      • getcomG
                        getcom @Konstanti
                        last edited by

                        @Konstanti said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

                        If possible, show the entire connection log on the PF side (phase-1 and phase-2)

                        This is the debug log : https://pastes.io/gcas2bfucl
                        I hopefully removed the second (working) tunnel log entries completely...
                        The public IPs are masked except the first digit to get a better overview.
                        Is the CIDR "|/0" in the local and remote network maybe the root cause?

                        K 1 Reply Last reply Reply Quote 0
                        • K
                          Konstanti @getcom
                          last edited by Konstanti

                          @getcom

                          It is difficult to say anything affirmatively , there is a lot of unnecessary information in the logs (such a high level of logging ,in my opinion, it is unnecessary) . now, unfortunately, I can 't look at the log again right now ( the service issues an error )
                          , But in the morning I saw that the traffic selectors on your side are configured correctly
                          If I were you, I would talk to the Cisco admin again so that he checks all the settings

                          3 22:23:00 pfsense1 charon[98668]: 01[CFG] <con3|7> proposing traffic selectors for us:
                          Apr 3 22:23:00 pfsense1 charon[98668]: 01[CFG] <con3|7> 10.242.62.128/26|/0
                          reverse mask 0.0.0.63

                          Apr 3 22:23:00 pfsense1 charon[98668]: 01[CFG] <con3|7> proposing traffic selectors for other:
                          Apr 3 22:23:00 pfsense1 charon[98668]: 01[CFG] <con3|7> 172.18.0.0/21|/0
                          reverse mask 0.0.7.255

                          It is necessary to check the ACL configured by the Cisco admin,
                          The screenshot shows that everything is configured correctly

                          b3c450a7-8929-4a16-9f21-305833a0dc8f-image.png
                          But maybe some settings were saved incorrectly.

                          for example, there is an error in the ACL name

                          70311ff3-7a3a-4cb1-8ff6-bcf43a4075fe-image.png

                          V 1 Reply Last reply Reply Quote 0
                          • V
                            viragomann @Konstanti
                            last edited by

                            @Konstanti said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

                            If I were you, I would talk to the Cisco admin again so that he checks all the settings

                            Agree with this. Since his site is not accepting the traffic selector, it's on him to find out the reason for the issue and resolve it. There should be logs with more details on this.

                            As mentioned, I was in a similar situation in the past. I got the config settings from the remote admin, set up the tunnel accordingly, but also got "TS_UNACCEPT" from the remote site.
                            It took me hours to proof that the issue was on his device.

                            Here is the log section, I sent to him:
                            6228ae44-e236-4ddb-8c3b-6f511707aa36-grafik.png

                            His answer was then, he missed a setting, which explicitly excluded our network from the enc domain.
                            Whatever this means. I don't know his device.

                            @getcom said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

                            Is the CIDR "|/0" in the local and remote network maybe the root cause?

                            No, I don't think. I use also "abnormal" subnets and all tunnels work well.
                            d69ba4ce-068a-4444-a894-d28c54040f72-grafik.png

                            getcomG 1 Reply Last reply Reply Quote 0
                            • getcomG
                              getcom @viragomann
                              last edited by

                              @viragomann
                              Same here. We have also plenty of tunnels running without any issue, also with different subnets. But this is also on their side. Their tunnels are also running without any issues.
                              I will get back to him. If I have any news, I will let you know.
                              pastes.io with my logfile link is not working anymore. It redirects now to pastebin.ai : https://pastebin.ai/gcas2bfucl

                              37e08f95-4ff3-4341-9859-969de8641832-grafik.png

                              getcomG 1 Reply Last reply Reply Quote 0
                              • getcomG
                                getcom @getcom
                                last edited by

                                Last outcome is that the Cisco admin will check every setting.
                                I told him to check if any ACL has a deny condition for the used subnets (e.g. overlapping) and he also should check if there is any typo in ACL naming.
                                Additionally I setup the pfSense to responder only to see what traffic selectors is coming from his side. I assume that he is not able to connect phase 2 because of a mistake on his side. We will see...

                                getcomG 1 Reply Last reply Reply Quote 0
                                • getcomG
                                  getcom @getcom
                                  last edited by getcom

                                  After ten months the Cisco admin found out that he had a typo in one of his profiles...
                                  The site to site VPN is working now as expected.

                                  V 1 Reply Last reply Reply Quote 0
                                  • V
                                    viragomann @getcom
                                    last edited by

                                    @getcom
                                    🤦
                                    I guess, it is an unerring admin of a big company likewise it was in my case.

                                    getcomG 1 Reply Last reply Reply Quote 0
                                    • getcomG
                                      getcom @viragomann
                                      last edited by

                                      @viragomann said in site to site VPN between pfSense 2.7.0 and Cisco ASR1001-X (1NG): phase 2 not working:

                                      @getcom
                                      🤦
                                      I guess, it is an unerring admin of a big company likewise it was in my case.

                                      a 150% admin...and yes a big company.
                                      I sent him the log extracts in April and told him that I thought the problem might be a typo in the profile. Of course, he didn't believe me. Then we had a long, detailed e-mail ping-pong until he understood that he needed to look more closely at his Cisco router...

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