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

    Firewall randomly blocking traffic

    Scheduled Pinned Locked Moved Firewalling
    13 Posts 3 Posters 753 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.
    • K
      kracken64
      last edited by

      Hi,

      I have an issue that popped up the other day. The firewall rules for my VPN interface will randomly start to block outbound TCP/UDP traffic for a few minutes, then all of a sudden it will allow again for a few minutes. Then block again, allow again, etc. etc.

      Here is a log I pulled from a test while trying to access a website
      fw-log.PNG

      And here are the rules for this interface (which have not changed in over a year)
      fw-rules.PNG

      Any ideas?

      Thanks.

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @kracken64
        last edited by

        @kracken64 Are you actually not able to connect to that web site, or could it be this?

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        K 1 Reply Last reply Reply Quote 0
        • K
          kracken64 @SteveITS
          last edited by

          @steveits Hi Steve. I cannot access the website, on any device (computer, phone, etc.) that connects to this interface. The issue seems to only affect the VPN gateway because if I enable the Bypass rule during the few minutes where things are getting blocked, they will then be allowed and I can access the site.

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @kracken64
            last edited by johnpoz

            @kracken64 My take would be your rule that allows traffic out your gateway, if the gateway fails - the rule just goes away, and now your traffic would fall through to your block rule.

            gateway.jpg

            Do you have that checked? if not then traffic should just flow out your default interface.

            Normally people want the traffic to fail when the vpn gateway is down, as a kill switch.

            edit: this setting is under System Advanced Miscellaneous

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            K 1 Reply Last reply Reply Quote 0
            • K
              kracken64 @johnpoz
              last edited by

              @johnpoz It appears that I do have that item checked
              gateway.PNG

              You are correct that I do not want traffic to get out if the VPN is down.

              So does this mean that it's functioning as intended and the problem lies directly with the gateway? In this case I would presume I may need to contact the VPN Provider to get it resolved?

              johnpozJ 1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator @kracken64
                last edited by

                @kracken64 yeah if pfsense thinks that gateway is down, and you have that checked - the rule would be skipped completely, and then traffic would fall through to your deny rule, or the default deny.

                The only thing that is a bit odd to me, is your block(reject) rules there at the end - which show in your log via the description don't seem set to log, so why are you seeing it logged? Did you change the rule to not log?

                You will need to look into why pfsense thinks your vpn gateway is down to why the traffic is falling through to your block rule.

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                K 1 Reply Last reply Reply Quote 0
                • K
                  kracken64 @johnpoz
                  last edited by

                  @johnpoz Yes I turned on logging after I took the rules picture. Sorry about that ๐Ÿ˜Š

                  Thanks for the help. Not sure why pfSense keeps losing the vpn gateway and then finding it again. It's a wireguard setup and the handshake between tunnel and peer seems to be ok. I've tried restarting the service and the pfSense box completely, but that had no impact. I've tried another wireguard config to a different server as well, but I get the same result.

                  johnpozJ 1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator @kracken64
                    last edited by

                    @kracken64 is monitoring failing? Pfsense should log if it sees a gateway go away, or thinks it goes away.

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    K 1 Reply Last reply Reply Quote 0
                    • K
                      kracken64 @johnpoz
                      last edited by

                      @johnpoz Yes it does fail quite frequently, which I noticed on the dashboard. Logs seem to show the same, but no indication as to the reason behind it.

                      gateway-log.PNG

                      johnpozJ S 2 Replies Last reply Reply Quote 0
                      • johnpozJ
                        johnpoz LAYER 8 Global Moderator @kracken64
                        last edited by

                        @kracken64 well you sure shouldn't be seeing that sort of packet loss.. What are you pinging for the monitor?

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 24.11 | Lab VMs 2.8, 24.11

                        1 Reply Last reply Reply Quote 0
                        • S
                          SteveITS Galactic Empire @kracken64
                          last edited by

                          @kracken64 Along those lines you can change the gateway monitoring IP, or disable the gateway monitoring and/or its action so it will never drop offline.

                          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                          Upvote ๐Ÿ‘ helpful posts!

                          K 1 Reply Last reply Reply Quote 1
                          • K
                            kracken64 @SteveITS
                            last edited by

                            @steveits @johnpoz

                            I was using 4.2.2.1 for monitoring, and never had an issue before. I would like to keep monitoring the gateway so I changed it to an OpenDNS server instead.

                            I've kept an eye on it over the past day and everything seems to be working ok now. No logs for the gateway and no undesired blocks from the firewall.

                            Thank you both for the help!

                            S 1 Reply Last reply Reply Quote 0
                            • S
                              SteveITS Galactic Empire @kracken64
                              last edited by

                              @kracken64 Sometimes sites/routers will drop/ignore pings if they get busy. Sometimes a hop or two out will work better, sometimes worse.

                              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                              Upvote ๐Ÿ‘ helpful posts!

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