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

    Can you enter firewall rules from command line (for injection from eleswhere)

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 2 Posters 3.1k 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 Offline
      cmcquistion
      last edited by

      We use pfSense as our firewall and would like to configure our DHCP/DNS registration system to inject firewall rules into pfSense when we set up a new device.

      Is there some kind of command line (or other) way of injecting a firewall rule that doesn't involve manually using the web interface?  (Maybe some long php string that we can pass directly to the web server?)

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

        There isn't an API for doing such things as it is.

        Though if you look at the easyrule code in 2.0 you can see how it could be done for the simple case of adding firewall rules (though deleting them would be much more difficult!)

        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
        • C Offline
          cmcquistion
          last edited by

          @jimp:

          There isn't an API for doing such things as it is.

          Though if you look at the easyrule code in 2.0 you can see how it could be done for the simple case of adding firewall rules (though deleting them would be much more difficult!)

          pfSense 2.0?  Any idea of when we might expect that?

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

            We keep saying RC1 will drop any day now… So hopefully soon. :-)

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.