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

    Enable/disabling services remotely without GUI

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 329 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.
    • M
      mrtom
      last edited by

      I'm looking for a way to enable or disable a service remotely without using the web GUI. For example, I'd like to stop Snort when I start a vulnerability scan and turn it back on when the scan is finished. Ideally the command to stop snort would be issued as part of a script from the server performing the vulnerability scans. Anyone have any ideas how I might accomplish this?

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

        Validity of that sort of change aside, you can start and stop services – but not disable them -- easily using the php shell scripts:

        pfSsh.php playback svc stop snort
        

        I don't have a box with snort handy to double check that it actually works, but it does work with other services.

        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
        • M
          mrtom
          last edited by

          Thanks, I'll experiment with this tonight.

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