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

Disable/enable firewall rule from shell (doing ssh) resp. PHP-script?

Scheduled Pinned Locked Moved Firewalling
2 Posts 2 Posters 3.2k 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.
  • U
    UweK
    last edited by Sep 22, 2011, 6:01 AM

    Hi, I've set up a pfSense router succesfully for a students lab.

    But the teachers are interested in enabling/disabling internet access (80/443) for the students manually by clicking on some desktop icons.

    So is there any way to disable/enable a firewall rule from shell (doing ssh) resp. PHP-script?

    I know the rule id and in the the WebGUI the admin can disable/enable rules.

    How is it done from CLI (teachers desktop icon is my problem, I know)?

    Thanks for help.

    UweK

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Sep 26, 2011, 3:57 PM

      There aren't any existing scripts to do that, but you could write one. It's just PHP.

      Have a look at the "easy rule" code for some examples of manipulating rules like that. Though the code adds rules, not disables, but it does other operations that would be similar.

      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
      1 out of 2
      • First post
        1/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received