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

    Can't terminate a session!!

    Scheduled Pinned Locked Moved Firewalling
    6 Posts 3 Posters 871 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.
    • C Offline
      carlmeek
      last edited by

      We've automated pfSense with a workflow allowing employees to request access to a server, have it approved, then automatically update the rule.  This is working brilliantly.

      Just one problem - when we remove the rule, it doesn't kick them off!  Microsoft RDP is the main protocol i've been testing with.

      This is how to recreate:
      1. Connect RDP to a server through the Firewall
      2. Remove the rule that allowed this to happen  (nothing at all happens…session continues)
      3. Then clear some states using PFCTL.  My command was pfctl -k 10.132.200.2/32 -k 10.130.40.2/32.  (at this point the session freezes)
      4. 10 seconds later, it automatically reconnects itself and continues as if nothing happened!  And sure enough the states are back in the table again.

      So my question is - aside from Firewall Rules, and states, what else is there?  What's allowing this to persist?

      Regards,
      -Carl.

      1 Reply Last reply Reply Quote 0
      • KOMK Offline
        KOM
        last edited by

        You didn't explicitly say, but after making your rule changes are you reloading them with pfctl -f so that they take effect?

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

          Actually we are running "/etc/rc.filter_configure"

          However, i've tried doing this manually on the pfSense front end as well - delete the rule and apply settings.  Same issue.

          1 Reply Last reply Reply Quote 0
          • KOMK Offline
            KOM
            last edited by

            Hmm, no idea then.  Sorry.

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

              I've found it - it's a bug in pfSense. Quite a hard one to spot!  Here is how to recreate the bug…..

              Create an alias for a port number.
              Create a rule using this alias
              Rename the alias
              Apply changes

              The firewall is now wide open.  The fact it can't find the alias, it assumes it means * !  Pretty serious flaw in the logic here.

              -C

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

                What version of pfSense is that on?

                I can't replicate that on 2.2.1. If I rename a port alias, the rule follows.

                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
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.