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

    When to enable the tcp flag "out of" ?

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 1.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.
    • N
      noak
      last edited by

      I am confused on the "out of" part of the TCP flags. Can anyone give me an example of when this should be used? I get how to use the "set" part, for example if a packet matches TCP:Syn then allow (i.e. syn is "set"). But should SYN "out of" also be checked?

      1 Reply Last reply Reply Quote 0
      • J
        jitguy
        last edited by

        My understanding is you set the "out of" bits for the flags you care about.  If the "out of" bit is not set, that flag is ignored.  If it is set, then that flag must match the set/not set setting.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          In nearly all cases, you will never need to touch that. It's for making sure some flags are set and others are unset.

          So if you have "S" out of "SA" checked it will only match if SYN is set and ACK is not set. This way it can match the first packet of a TCP handshake but not the later packets. That example is the default choice when that control is left alone at the default and the rule is for TCP.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 1
          • N
            noak
            last edited by

            Thanks, that explanation also confirms what I read here:

            https://www.openbsd.org/faq/pf/filter.html

            ctrl-f tcp flags

            This doc cleared up my confusion on tcp flags a lot.

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