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

    Firewall has gone erratic, respecting the rule one second, stopping the next

    Scheduled Pinned Locked Moved Firewalling
    26 Posts 5 Posters 1.4k Views 4 Watching
    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.
    • D Offline
      Dicmo @SteveITS
      last edited by

      @teamits said in Firewall has gone erratic, respecting the rule one second, stopping the next:

      @dicmo said in Firewall has gone erratic, respecting the rule one second, stopping the next:

      Is it possible that the firewall rule using the VPN_WAN_GW gets ignored because the gateway is not available

      That was a complaint in IPv6 No Gateway after 2.5 upgrade and the Redmine report but that's specifically related to IPv6.

      Well, I can tell you it is happening in 2.5 with IPv4, that is for sure.

      1 Reply Last reply Reply Quote 0
      • D Offline
        dma_pf @Dicmo
        last edited by

        @dicmo said in Firewall has gone erratic, respecting the rule one second, stopping the next:

        How do I go about debugging what might be happening with this gateway? The logs of OpenVPN, the vpn client I am using, show nothing like that, only show the initial connection and nothing more, and the VPN status says it has been connected without issues. I would appreciate any advice on how to look for the issue.

        You can test this by disabling the Gateway Monitor in System/Routing/Gateways for the VPN Gateway. If the IP address that the monitor is using does not respond to the monitoring service then the gateway will be marked as down even if the connection is stable.

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          Dicmo @dma_pf
          last edited by Dicmo

          @dma_pf said in Firewall has gone erratic, respecting the rule one second, stopping the next:

          @dicmo said in Firewall has gone erratic, respecting the rule one second, stopping the next:

          How do I go about debugging what might be happening with this gateway? The logs of OpenVPN, the vpn client I am using, show nothing like that, only show the initial connection and nothing more, and the VPN status says it has been connected without issues. I would appreciate any advice on how to look for the issue.

          You can test this by disabling the Gateway Monitor in System/Routing/Gateways for the VPN Gateway. If the IP address that the monitor is using does not respond to the monitoring service then the gateway will be marked as down even if the connection is stable.

          Ok, it seems that fixed the issue of the Gateway going down all the time. I guess now I should go to the VPN section and find out why I have 20%+ packet loss, because I am guessing that is not normal. I am hoping it is a problem with the monitoring and not with the VPN itself.

          Again, thanks everybody for helping someone who is starting. I never though this would turned to be so involved.

          D 1 Reply Last reply Reply Quote 0
          • C Offline
            cool1two @dma_pf
            last edited by

            @dma_pf
            Here to help the cause. Below is a network diagram and screenshots of my rules. There is nothing here that is exotic. Random comments and suggestions welcome :)

            Network:
            ded3e599-e454-47af-935b-b006ab5c3a2a-image.png
            FW Floating:
            4d95cfea-c2ab-4cf5-97d8-feabb13ffabf-image.png
            FW WAN:
            14588206-a608-415d-9879-9d559f04454a-image.png
            FW LAN:
            23e61813-f9b6-4768-8947-f96a150d6612-image.png
            FW IOT:
            4057fb89-f422-45eb-b81f-6c38e0312d0c-image.png
            FW NGT - Test Network:
            00c440ad-89a7-41a4-8cb9-1c76ab155c04-image.png
            FW NAT:
            5b49c709-bdab-4fe8-a8c2-8a83eddcf607-image.png

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

              @cool1two said in Firewall has gone erratic, respecting the rule one second, stopping the next:

              Random comments and suggestions welcome

              You rules allowing dns to XYZ "net" don't make a lot of sense. You should use XYZ "address" here.. For example the iot network... Pfsense has no control over A talking to B in the iot net.. So saying your allowing to iot net doesn't make sense, what you can allow is dns to pfsense iot address..

              edit: Also not really understanding the point of the multicast and and broadcast traffic rules on your floating.. Other than not logging it.. What for example is pfsense going to do with LLMNR multicast traffic? Or the SSDP stuff? Other than not wanting that logged in the default block rule - Not sure what your expecting those rules to do?

              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 25.07 | Lab VMs 2.8, 25.07

              C 2 Replies Last reply Reply Quote 0
              • D Offline
                dma_pf @Dicmo
                last edited by

                @dicmo said in Firewall has gone erratic, respecting the rule one second, stopping the next:

                Ok, it seems that fixed the issue of the Gateway going down all the time. I guess now I should go to the VPN section and find out why I have 20%+ packet loss, because I am guessing that is not normal. I am hoping it is a problem with the monitoring and not with the VPN itself.

                I had a similar situation with a VPN provider. I got in touch with them and they suggested using the WAN IP address of their server as the monitor IP. That didn't work. They suggested using the IP address of their DNS servers. That didn't work either. Nonetheless running a continuous ping test through their VPN servers out to the internet to various servers all showed acceptable latency and packet loss. It was clearly an issue in ping responses times to their servers which was causing the issue, but it had nothing to do with the quality of their vpn services.

                My "fix" was to create 2 other simultaneous connections to servers offered by my VPN provider. (Just duplicate the interfaces, gateways, NAT, firewall, etc. of the existing VPN but point them to different servers.). I disabled the gateway monitoring on each of the gateways and then bound the 3 interfaces as an interface group. You can then use the interface group for policy routing in your firewall rules. Since then, I've never seen a gateway marked as down, and if one of the VPN servers was to go down then traffic would still be able to get routed out the other 2 servers. I've never been in a position to where I've not been able to route traffic through the VPN provider.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  cool1two @johnpoz
                  last edited by

                  @johnpoz
                  Rules 1 and 2 in the VLAN in effect say, if you are using the VLAN gateway as your DNS provider then you can pass, otherwise you will be blocked.

                  This prevents IOT systems with pre-programmed DNS servers, such as Google Mini, from using an unauthorized DNS server.

                  As far as the IGMP floating rules. All of the switches participate in IGMP Snooping Query election for the network. Additionally, all of the switches are doing LLDP discovery. The Netgate PFsense router was blocking this traffic for all VLANs and for any device on those VLANs. This caused several issues, including all of the switches believing they had been elected as the IGMP Snooping Querier. With these rules in place all of the switches, including the UNIFI now agree on who is doing what.

                  .25 switch
                  31b56b18-468d-43c8-9898-b94cb17c6177-image.png

                  .26 switch
                  92457a73-06ae-40ad-bb24-ec334ef034c3-image.png

                  .27 switch
                  67d95ce9-da8e-4783-8750-419e20f601b0-image.png

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    cool1two @johnpoz
                    last edited by

                    @johnpoz
                    I did take your advice and switch the VLAN rules to IOT and NGT address instead of Net. Thank you for the suggestion.

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

                      I am quite sure I understand what the rules say and do ;)

                      IGMP doesn't pass the router.. So those are pointless - other than having them prevents them from being logged.

                      None of those floating rules make any sense at all - broadcast and multicast is not going to pass the router.. And pfsense sure isn't needing to actually see that traffic..

                      The Netgate PFsense router was blocking this traffic for all VLANs and for any device on those VLANs.

                      No it wasn't - can promise you that.. Pfsense is a L3 router, it doesn't care or do anything with traffic on the L2 its attached to - it couldn't even if it wanted to.

                      You seeing it block it to its interfaces, has zero to do with other devices on that L2 from seeing that traffic.

                      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 25.07 | Lab VMs 2.8, 25.07

                      C 1 Reply Last reply Reply Quote 1
                      • C Offline
                        cool1two @johnpoz
                        last edited by

                        @johnpoz

                        I did take two actions based on your response. The first was to disable all of the floating rules. The second was to update the IGMP poller "IPs" in my switches to "IPs" in the subnet range for those VLAN. According the Netgear's documentation, these are not actually "IPs". They are simply used for the election process, and indeed I cannot ping them and they have no ARP entry. However, this did resolve the issue for the IPV4 floating rules. I still get warnings for the related IPV6 rules, but I do not use IPV6 so I do not worry.

                        Thank you for your feedback. It was very valuable.

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