Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    TCP Options set in web interface not created in the raw pf rules

    Scheduled Pinned Locked Moved Firewalling
    7 Posts 2 Posters 2.2k 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.
    • A Offline
      adam65535
      last edited by

      Running 2.0.3-RELEASE (amd64)

      I was trying to cut down on some of the non-important rule logging and in trying to do so I found out that rules are not getting generated with the TCP Options set even when setup to do so in the GUI.

      I am trying to not log FA packets from clients on the LAN when expired connections timeout on the firewall before the client.

      I setup the rule as follows in the gui:
      Action: Block
      Interface: LAN
      Protocol: TCP
      Source: LAN subnet
      Destination: any
      Log: Drop harmless FA packets from logging on LAN  (The idea is not to set this because I want to filter this out but I set it to see that the rule is indeed blocking SYN only packets)
      TCP Flags: SET:FIN,ACK  OUTOF:FIN,SYN,RST,ACK,URG
      State Type: none   (none because I don't want these already expired packets from and old connection creating another state in the firewall)

      The rule blocks SYN only packets:
      BLOCK Jun 14 18:01:04 LAN   192.168.x.x:38168   178.33.x.x:80 TCP:S

      The rule that triggered this action is:
      @69 block drop in log quick on em1 inet proto tcp from 192.168.250.0/24 to any port = 8080 label "USER_RULE: Drop harmless FA and FPA packets from logging on LAN"

      After looking at the generated rule in /tmp/rules.debug I see why…
      block  in log  quick  on $LAN  proto tcp  from 192.168.250.0/24 to any port 8080   label "USER_RULE: Drop harmless FA and FPA packets from logging on LAN"

      The rule didn't get the TCP Options restrictions added to the rule.

      Is this a known bug?

      1 Reply Last reply Reply Quote 0
      • C Offline
        cmb
        last edited by

        They were only being added on pass rules. They are valid on block or reject. I just fixed that, tomorrow's 2.1 snapshot will work with that.

        1 Reply Last reply Reply Quote 0
        • A Offline
          adam65535
          last edited by

          Any chance on the next maintenance release of 2.0.x getting that in there?  I realize that could be a very long time.

          I am really surprised that nobody has used such rules… Well it might be more accurate to say nobody noticed it doesn't work anyway :).

          Thanks for the fix in 2.1.  Your time looking into it is appreciated.

          1 Reply Last reply Reply Quote 0
          • C Offline
            cmb
            last edited by

            There almost certainly won't be any more 2.0.x releases since 2.1 is near release, and it's not as simple as cherry picking it over to RELENG_2_0 so it's not fixed there.

            1 Reply Last reply Reply Quote 0
            • A Offline
              adam65535
              last edited by

              Understood.  I didnt realize that 2.0.x would be EOL (no updates including security i assume) so soon after 2.1 is released.  Thanks again.

              1 Reply Last reply Reply Quote 0
              • A Offline
                adam65535
                last edited by

                I just tested this on todays 2.1 snapshot and it is working.

                The rule that triggered this action is:

                @99 block drop in log quick on em1 inet proto tcp from 192.168.x.0/24 to any flags FA/FSRPAU label "USER_RULE: Drop harmless FA and FPA packets from logging"

                I can now disable logging of that rule to happily never see them again.

                1 Reply Last reply Reply Quote 0
                • A Offline
                  adam65535
                  last edited by

                  Removed comment.  Not related.  The fix worked for this.

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