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

    Vpn Ipsec tunnel phase 2 show 0 bytes of data

    Scheduled Pinned Locked Moved General pfSense Questions
    13 Posts 2 Posters 3.7k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      I assume you do see traffic the other way and at both ends?

      Is it all traffic that fails or just the video stream? Can you ping across it for example? From either end?

      Do you have firewall rules with policy routing?

      Do you see states opened correctly at both ends?

      Steve

      V 2 Replies Last reply Reply Quote 0
      • V
        Vikas Gupta @stephenw10
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • V
          Vikas Gupta @stephenw10
          last edited by

          @stephenw10
          We see the traffic from one side only on other end the traffic of other firewall is 0 byte only, a single firewall is throwing the traffic which is getting received. It looks that other firewall doesn't like to throw its packet out.
          Nothing is getting access or ping, it seems like tunnels are connected but when we see phase 2 entry, traffic of one firewall is getting flow, the other firewall traffic is neither send out which in the end nor received from one side.
          We do have the firewall rules and policy routing in its place, as I mentioned if restart the service of charon, it works.
          Once we restart the IPsec and charon service the traffic in phase 2 tunnel start showing, we do see the traffic in firewall states.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Ah OK you don't see any packets arriving either.

            Do you have DPD enabled?

            Do the SPIs match on both ends when it is not passing traffic?

            Check in Status > IPSec > SADs

            Steve

            V 1 Reply Last reply Reply Quote 0
            • V
              Vikas Gupta @stephenw10
              last edited by

              @stephenw10
              DPD is enabled at both ends but we checked that SPIs do not match.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Hard to see how DPD would be succeeding if the SPIs do not match.

                But check logs. One side is clearly re-keying without deleting the old SPIs for some reason.

                Steve

                V 1 Reply Last reply Reply Quote 0
                • V
                  Vikas Gupta @stephenw10
                  last edited by

                  @stephenw10
                  We looked into the SAD entries and there were some entries with data as 0 bytes. We manually tried to delete these but these entries did not get deleted because of PHP code error. After fixing that, we were able to delete these entries manually.
                  Please let us know what should be the exact behavior and how it relates to our issue so hat we can look into this further.
                  Are these entries supposed to be deleted automatically?

                  Thank you, looking forward for your valuable response.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    You found a php code error in the IPSec status page? Or some backend script?

                    Did you open a big report? Submit a pull request?

                    Steve

                    V 1 Reply Last reply Reply Quote 0
                    • V
                      Vikas Gupta @stephenw10
                      last edited by Vikas Gupta

                      @stephenw10
                      In future, we will submit a pull request but as of now, we are mainly focusing on fixing this issue. Can you please let us know about SAD entries' actual behavior.

                      When we tried to delete the SAD entries from the SAD entries page it did not worked. We found a bug in delete functionality.

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        When childSAs are re-keyed a new SA is created and the old one removed. In some setups the old SA is not removed but will expire at the end of it's lifetime. That can lead to several childSAs being shown for the same connection but only the most recent should ever be carrying traffic. That is not normally an issue.

                        If you are seeing the most recent SAs with zero packets incoming that seems far more likely to be a problem in the route.

                        Steve

                        V 1 Reply Last reply Reply Quote 0
                        • V
                          Vikas Gupta @stephenw10
                          last edited by

                          @stephenw10
                          Thank you for your feedback. Just want to confirm one thing that if there is an issue with route, is it possible for VPN tunnels to stay connected but sending or receiving 0 bytes of data/packets.
                          In our case, tunnels are being displayed as connected but no packet transfer is there.

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            If dpd is enabled then the P1 will not stay up if the route between the end points is interrupted.

                            However if your tunnels are not using NAT-T then the P2 traffic will be ESP dircetly and it is possible for that to be blocked resulting in the tunnel establishing (over UDP port 500) but not passing traffic.

                            Steve

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