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

    How to determine the actual number of firewall table entries?

    Scheduled Pinned Locked Moved Firewalling
    7 Posts 3 Posters 696 Views 3 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.
    • P Offline
      pslinn
      last edited by

      I would like to compare the Firewall Maximum Table Entries limit against the actual number of table entries. How do you determine the actual number of firewall table entries?

      Regards.

      1 Reply Last reply Reply Quote 0
      • viktor_gV Offline
        viktor_g Netgate
        last edited by

        You can see it on the Diagnostics / Tables page:
        Screenshot from 2020-05-13 19-06-02.png

        or in shell:

        pfctl -t pfB_PRI1_v4 -T show | wc -l
        633
        
        1 Reply Last reply Reply Quote 0
        • P Offline
          pslinn
          last edited by

          Thanks. I was not aware of that. This helps.

          This number represents the total for each table. Is there no existing function which sums all the totals for each table into one total for the system, or do I need to write a script for that?

          Regards.

          viktor_gV 1 Reply Last reply Reply Quote 0
          • viktor_gV Offline
            viktor_g Netgate @pslinn
            last edited by

            @pslinn right, you need to write a script for that

            also check the pfctl -vvsTables command

            1 Reply Last reply Reply Quote 0
            • P Offline
              pslinn
              last edited by

              @viktor_g said in How to determine the actual number of firewall table entries?:

              pfctl -vvsTables

              Thanks. I will give this a try.

              Regards

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

                While not 100% accurate as there are lines taken up by the table name headers and blank lines between tables, this gets you close:

                : pfSsh.php playback pftabledrill | wc -l
                  113255
                

                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 0
                • P Offline
                  pslinn
                  last edited by

                  This gets very close. Very usable. Thank you.

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