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

    Alias links to an "invisible" filter rule

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 295 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.
    • T
      tiiash
      last edited by

      Today I did some housekeeping on a pfSense machine that has been in use for quite some years.
      The system is freshly updated to 2.9.0.

      I wanted to clean up old aliases, but when I try to delete one of them I receive an error message that it cannot be deleted because it is currently in use by "filter rule id 11":
      alias_error.png

      I tried to identify what rule 11 is. Assuming that this refers to firewall rules, I found that you can specify a rule ID as a GET parameter in the URL to show it:

      https://pfsense.example.com/firewall_rules_edit.php?id=11

      The rule that is shown when accessing this URL does not contain a reference to the alias.

      Additionally, I found that there are rules that I cannot see in the GUI. Currently, this affects the firewall rule with ID number 2. I can access it using the URL format mentioned above, but the interface that it is applied to doesn't show it in the GUI.

      I don't know if and how these two issues are related. I don't even know if the "filter rule id 11" refers to rules in the firewall tab or something else.

      Any help troubleshooting this would be greatly appreciated :).

      SteveITSS 1 Reply Last reply
      Reply Quote 0
      • SteveITSS
        SteveITS Galactic Empire @tiiash
        last edited by

        @tiiash This may help:
        https://docs.netgate.com/pfsense/en/latest/firewall/pf-ruleset.html

        To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
        Only install packages for your version of pfSense.
        Upvote 👍 helpful posts!

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

          Yup try checking the ruleset directly like: pfctl -vvsr

          So for example:

          [26.10-DEVELOPMENT][admin@plusdev.stevew.lan]/root: pfctl -vvsr | grep -A 4 @13
          @13 pass quick inet6 proto ipv6-icmp all icmp6-type neighbrsol keep state (if-bound) label "descr=ICMPv6 operation" ridentifier 1000000117
            [ Evaluations: 156       Packets: 1         Bytes: 72          States: 0     ]
            [ Source Nodes: 0      Limit: 0      NAT/RDR: 0      Route: 0      ]
            [ Inserted: uid 0 pid 0 State Creations: 0     ]
            [ Last Active Time: N/A ]
          

          However rule 11 is very early in the ruleset, those are not normally user rules that could reference a user alias. What alias are you trying to remove?

          1 Reply Last reply
          Reply Quote 0
          • T
            tiiash
            last edited by tiiash

            Thank you for your replies.

            I am trying to delete a custom network alias that I have created probably years ago. It is a recursive alias that in turn contains references to other aliases, some of which don't even exist any longer (which is why I'd like to delete this one).

            Today I worked some more on the firewall, created a few rules and therefore reloaded the ruleset multiple times. Potentially due to this, the error message now no longer refers to "rule id 11" but to "rule id 2".

            When checking rule id number two via pfctl -vvsr, I see that this ID appears twice, but both refer to some internal pfSense rules:

            [2.9.0-RELEASE][admin@REDACTED]/root: pfctl -vvsr | grep "@2 " -A4
            @2 scrub on igb0 inet all fragment reassemble
              [ Evaluations: 16076373  Packets: 3589411   Bytes: 3024969     States: 0     ]
              [ Source Nodes: 0      Limit: 0      NAT/RDR: 0      Route: 0      ]
              [ Inserted: uid 0 pid 0 State Creations: 0     ]
              [ Last Active Time: N/A ]
            --
            @2 block drop in log quick inet6 from any to <_nat64reserved_:16> label "descr=Block NAT64 for non-global IPv4" ridentifier 1000000001
              [ Evaluations: 234950    Packets: 0         Bytes: 0           States: 0     ]
              [ Source Nodes: 0      Limit: 0      NAT/RDR: 0      Route: 0      ]
              [ Inserted: uid 0 pid 0 State Creations: 0     ]
              [ Last Active Time: N/A ]
            

            When trying to access the rule via https://pfsense.example.com/firewall_rules_edit.php?id=2 I am shown something that doesn't make sense.
            rule_information.png

            According to the information at the bottom of the rule, it has initially been created in 2016. The rule is shown to be affecting the "WireGuard" interface, which is the floating firewall tab for WireGuard VPNs. However, in 2016 WireGuard hasn't even been present in pfSense. The firewall tab in the Web GUI does not show this rule.
            However, it seems that this rule is in fact the culprit. I can see that it has the problematic alias defined as destination.

            So I somehow "solved" the issue of identifying the rule (even though it seems that the ID inside the GUI doesn't match the pfctl IDs).
            But how can I make the rule visible again? And even more importantly: How can I make sure that no other "secret" rules exist in my firewall?

            Update: I found that I can grep for my aliases in pfctl and it will show the rules where they are used in. For this particular alias, pfctl doesn't show a filter rule containing it, but the alias is listed at the bottom of the output in the "SOURCE LIMITERS" section.

            -pa---- ip_netz_gruppe_dthq
                    Addresses:   3
                    Cleared:     Thu Oct 29 18:00:04 2026
                    References:  [ Anchors: 0                  Rules: 0                  ]
                    Evaluations: [ NoMatch: 0                  Match: 0                  ]
                    In/Block:    [ Packets: 0                  Bytes: 0                  ]
                    In/Pass:     [ Packets: 0                  Bytes: 0                  ]
                    In/XPass:    [ Packets: 0                  Bytes: 0                  ]
                    Out/Block:   [ Packets: 0                  Bytes: 0                  ]
                    Out/Pass:    [ Packets: 0                  Bytes: 0                  ]
                    Out/XPass:   [ Packets: 0                  Bytes: 0                  ]
            
            1 Reply Last reply
            Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Hmm, exactly what command are you using to generate that?

              T 1 Reply Last reply
              Reply Quote 0
              • T
                tiiash @stephenw10
                last edited by

                @stephenw10 You mean the last snippet in my update section? That is part of pfctl -vvsa. To be exact that is the output of [2.9.0-RELEASE][admin@REDACTED]/root: pfctl -vvsa | grep -i ip_netz_gruppe -A10.

                1 Reply Last reply
                Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                Privacy Policy · Cookie Policy