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

    Introducing PHPService Package

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 2.6k 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
      cybrsrfr
      last edited by

      I have created a new package for pfSense called PHPService.

      It runs PHP as a service from the command line. It runs a controlled loop so that the execution of the PHP code is continuous. At this time the loop has a 1 second delay so that it keeps processor usage down. I may make the delay adjustable in the future. After installation the service is empty and has to have PHP code provided to it for it to do anything. You can see example PHP code that monitors the Snort Alert file for changes and disconnects sessions.

      For more information see:
      http://doc.pfsense.org/index.php/PHPService

      The snort example 'Snort Alert Disconnect Sessions' was sponsored by forum user: miteltec
      It was designed specifically for Snort alerting on p2p traffic category.

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

        Hi there,
        I just installed this and have found a minor bug. It appears that you can't delete a entry once you have added it. The best you can do is disable it.

        I'm running version 1.2.2

        Thanks!

        1 Reply Last reply Reply Quote 0
        • C
          cybrsrfr
          last edited by

          New version is available.

          Changes
          1. Fixed the bug that prevented the delete
          2. Added logging to  /var/log/phpservice.log anything that is echoed will be saved to the log.
          3. Also improved the php service so it backgrounds better.

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