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

    Problems with all floating rules setup?

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 2 Posters 894 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

      Can you show us any specific examples?

      Seeing TCP:A traffic blocked can just be because the state closed and some host is still sending traffic. Not necessarily an issue.

      Do you actually see any connections fail you expect to be passed?

      See: https://docs.netgate.com/pfsense/en/latest/troubleshooting/log-filter-blocked.html

      Steve

      G 1 Reply Last reply Reply Quote 0
      • G
        GeorgePatches @stephenw10
        last edited by

        @stephenw10 Unfortunately because work stuff I can't really share too many specifics.

        To your point about dropped TCP:A traffic not necessarily being an issue, I'd agree except that I've done everything to make it go away and it's still happening. I have the firewall set to conservative and I have allow IP options and all TCP flags checked on my allow all rule. Should that not catch things like this, or am I not understanding something?

        Seems like everything is working as expected, so no major complaints.

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

          You'd need sloppy states set too if you actually want to allow out-of-state TCP packets. But you probably don't. That traffic should almost always be blocked.

          G 1 Reply Last reply Reply Quote 0
          • G
            GeorgePatches @stephenw10
            last edited by

            @stephenw10 Does that mean that the TCP flags setting doesn't do anything unless I set sloppy states?

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

              It doesn't do nothing but otherwise pf tracks tcp connections and expects to see them in the correct order. If you've got some route asymmetry or similar you have to stop it doing that to pass them.

              But you almost certainly don't want to pass those!

              G 1 Reply Last reply Reply Quote 0
              • G
                GeorgePatches @stephenw10
                last edited by

                @stephenw10 Well that is unless you're doing what I'm doing and trying to make a router that logs traffic. And there is some asymmetric routing going on in my environment by design. We're testing out various network security tools and inventive routing is sometimes part of that.

                I've found what's either a bug or an undocumented requirement of using the TCP flags feature of a rule. If you create a rule (floating or otherwise) with the protocol set to any or TCP/UDP and then check TCP flags any, the rule will actually show up as flags S/SA in pfctl. Only if you set the rule's protocol to TCP will the TCP flags feature have any affect.

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

                  It actually shows that in pfctl -vsr?

                  Interesting. And, yes, if you intentionally have asymmetric routing you will need that. Or add stateless rules both ways.

                  G 1 Reply Last reply Reply Quote 0
                  • G
                    GeorgePatches @stephenw10
                    last edited by

                    @stephenw10 said in Problems with all floating rules setup?:

                    It actually shows that in pfctl -vsr?

                    Yes, definitely. I got into work this morning and added a TCP rule with flags any above my any protocol rule and it immediately resolved all the blocked traffic I was seeing.

                    I can understand this was maybe done by design? Like I see the logic in "if they want to do weird TCP flag stuff, they should only be doing it in a TCP only rule." I just wish it was documented in the UI, or at least the docs site. Would have saved me a lot of head scratching. Reading through the pf documentation, I can't seem to find anything saying you can't do a flags any with proto any. So could be a bug or a similarly undocumented "feature."

                    In the end it turns out that it had nothing to do with floating rules, that was just where I noticed it. For me this really about explaining the behavior that wasn't making sense to me.

                    What's the procedure for reporting this? I've never had an issue I've actually needed to file before.

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

                      Open an issue for it in redmine: https://redmine.pfsense.org/

                      I don't see anything open for it currently. Which is surprising.

                      G 1 Reply Last reply Reply Quote 1
                      • G
                        GeorgePatches @stephenw10
                        last edited by GeorgePatches

                        @stephenw10 I'll get that submitted tonight. Thanks for talking through this with me. 🙂

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