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

    API to create schedule on demand

    Scheduled Pinned Locked Moved Development
    3 Posts 2 Posters 3.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.
    • P
      pat1974
      last edited by

      Hey guys, I'm sorry because I didn't do a lot of research about this before asking the question. But I figure that if somebody already have the answer I could find a solution quickly and implement it.

      I have a portal that I want the user to login then once they are login I automatically, would like to send a command to pfsense to create a Firewall: Schedules.

      This currently is all available within pfsense, I can just navigate to the Firewall: Schedules and create the schedule manually.

      But I have no clue if it is possible to programmatically just call an API which can receive all the parameter required for the schedule and automatically save.

      I think that I would create schedule a head of time, and then just programmatically do update to these schedule.

      Basically if I could call to the save button in this page: firewall_schedule_edit.php?id=0
      And provide all the value that the save needs to save a schedule that would be great.

      Any one can help me with that?

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        You will need to learn how pfsense and it's XML works.

        A php that receives a schedule and update/save on pfsense is not that hard and on my opinion the easiest way to do this.

        The portal is on the same pfsense?

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • P
          pat1974
          last edited by

          The portal is actually PFsense, after anlyzing the function provided by the portal, it will be better to use that, with a radius server it will authenticate with another system ever X minutes, so this will help control the access to the portal for a specific period of time.

          Thanks

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