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

    Remotely enamble disable rule

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 5 Posters 1.3k 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.
    • Z
      znelbok
      last edited by

      Hi

      I have a HA system in my house and a very small limited internet connection.  One thing I have enabled is rules that block the kids devices from the internet because they just don't get it.

      Occasionally they need access for things such as homework.

      What I want to do is be able to enable and disable rules remotely via the HA system.  Is there a way to do this at all - SNMP?

      I know this may cause a security issue, but doing it from the web interface is not something that family members are cable of dealing with.  If I do it from the HA system I can put a password on the button to turn it back on to prevent the kids from doing it themselves

      Mick

      1 Reply Last reply Reply Quote 0
      • Z
        znelbok
        last edited by

        OK, looks like no one knows how to do it.

        I had a thought last night.  In the firewall rules page there is the little enable button which is what I assume is a httpget request to the server. (could be a post request?)

        Now if I take this link and paste the URL into the browser directly, I don't expect it to work because I am not logged in.

        I tried adding http://user:pass@<pfsense>…... but that did not work either.

        Does anyone know how I can get the url to toggle the rule from enable to disable to work directly from a httpget request directly.

        Thanks

        Mick</pfsense>

        1 Reply Last reply Reply Quote 0
        • K
          kejianshi
          last edited by

          Yes - Log in with a vpn, go to your firewall rules and enable or disable whichever rules you like remotely…

          1 Reply Last reply Reply Quote 0
          • N
            NOYB
            last edited by

            Currently there is no pfSense scripting API.

            Even if you could flip the check box state via a GET request, I believe the change would still have to be applied to the firewall before becoming active.

            You could write a PhantomJS script that would login to the Web GUI and make the change.

            1 Reply Last reply Reply Quote 0
            • D
              dgshue
              last edited by

              Are you still looking for a solution to this?

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

                I doubt it. This post is four years old, and that user has not logged in since November 2017.

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