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

    Firewall Rules Color

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 2 Posters 410 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
      Antibiotic
      last edited by Antibiotic

      Hi, is it possible to make firewall rules colorize?
      For example block in full red , reject full yellow, allow full green. Something like this? or Firewall rules with color tags

      pfSense plus 24.11 on Topton mini PC
      CPU: Intel N100
      NIC: Intel i-226v 4 pcs
      RAM : 16 GB DDR5
      Disk: 128 GB NVMe
      Brgds, Archi

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @Antibiotic
        last edited by

        @Antibiotic Yes and no. You could create your own pfSense theme.

        Coloring can be done with CSS, perhaps crudely here based on the title attribute of the second cell (since the row isn't classed as pass/block/reject):

        tr:has(td:nth-child(2)[title="traffic is rejected"]) {
           background-color: #ff000033;
        }
        tr:has(td:nth-child(2)[title="traffic is passed"]) {
          background-color: #00ff0033;
        }
        

        However the table of rules is (faintly) striped, and the more specific disabled overrides the coloring, using

        .table-striped > tbody > tr.disabled:nth-of-type(2n+1) {
        and
        .table-striped > tbody > tr.disabled:nth-of-type(2n) {
        

        ...so some work would need to be done on getting the CSS to be correct for all cases.

        image:
        d8691e1b-2041-4e54-b779-d5b5a706e2de-image.png

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        A 1 Reply Last reply Reply Quote 0
        • A
          Antibiotic @SteveITS
          last edited by Antibiotic

          @SteveITS Any links for custom pfsense themes? I tried to search in github but all too old!Pfsense-dark-beta is it buggy theme?

          pfSense plus 24.11 on Topton mini PC
          CPU: Intel N100
          NIC: Intel i-226v 4 pcs
          RAM : 16 GB DDR5
          Disk: 128 GB NVMe
          Brgds, Archi

          S 1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @Antibiotic
            last edited by

            @Antibiotic I have no knowledge about making themes, sorry.

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote ๐Ÿ‘ helpful posts!

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