All Projects → cpainchaud → Pan Configurator

cpainchaud / Pan Configurator

Licence: other
Framework and utilities to easily manage and edit Palo Alto Network PANOS devices

Projects that are alternatives of or similar to Pan Configurator

Pan Os Python
The PAN-OS SDK for Python is a package to help interact with Palo Alto Networks devices (including physical and virtualized Next-generation Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics the traditional interaction with the device via the GUI or CLI/API.
Stars: ✭ 194 (-10.19%)
Mutual labels:  firewall, panorama, pan
Kubernetes Pfsense Controller
Integrate Kubernetes and pfSense
Stars: ✭ 100 (-53.7%)
Mutual labels:  api, firewall
Core
OPNsense GUI, API and systems backend
Stars: ✭ 1,827 (+745.83%)
Mutual labels:  api, firewall
Pfsense Api
The missing REST API package for pfSense
Stars: ✭ 126 (-41.67%)
Mutual labels:  api, firewall
Apiato
PHP Framework for building scalable API's on top of Laravel.
Stars: ✭ 2,564 (+1087.04%)
Mutual labels:  api
Mercure
Server-sent live updates: protocol and reference implementation
Stars: ✭ 2,608 (+1107.41%)
Mutual labels:  api
Instagram Api Python
Unofficial instagram API, give you access to ALL instagram features (like, follow, upload photo and video and etc)! Write on python.
Stars: ✭ 2,357 (+991.2%)
Mutual labels:  api
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (-3.7%)
Mutual labels:  api
Ray
a framework that helps you to deliver well-designed python APIs
Stars: ✭ 215 (-0.46%)
Mutual labels:  api
Symfony Flex Backend
Symfony Flex REST API template project
Stars: ✭ 214 (-0.93%)
Mutual labels:  api
Express Es6 Rest Api
🔋 Starter project for an ES6 RESTful Express API.
Stars: ✭ 2,401 (+1011.57%)
Mutual labels:  api
Taxize
A taxonomic toolbelt for R
Stars: ✭ 209 (-3.24%)
Mutual labels:  api
Falco
A functional-first toolkit for building brilliant ASP.NET Core applications using F#.
Stars: ✭ 214 (-0.93%)
Mutual labels:  api
Bilibili Api Collect
哔哩哔哩-API收集整理【不断更新中....】
Stars: ✭ 4,497 (+1981.94%)
Mutual labels:  api
Crafatar
A blazing fast API for Minecraft faces
Stars: ✭ 212 (-1.85%)
Mutual labels:  api
Cornichon
Scala DSL for testing HTTP JSON API
Stars: ✭ 211 (-2.31%)
Mutual labels:  api
Googleanalyticsr
Use the Google Analytics API from R
Stars: ✭ 213 (-1.39%)
Mutual labels:  api
Careyshop
采用前后端分离,支持分布式部署。框架内部使用面向对象模块化调用,在多终端、跨平台时采用 REST API 进行数据交互,可直接对接 PC商城、小程序商城、H5商城,构建 Android、IOS 的 APP。[微信商城 B2C商城 PHP商城系统 微信公众号商城]
Stars: ✭ 213 (-1.39%)
Mutual labels:  api
Magic
Create your .Net Core/Angular/Database CRUD Web apps by simply clicking a button
Stars: ✭ 214 (-0.93%)
Mutual labels:  api
Express Api Es6 Starter
Build APIs with Express.js in no time using ES6/ES7/ESNext goodness.
Stars: ✭ 212 (-1.85%)
Mutual labels:  api

PAN-Configurator

PAN-Configurator is a PHP library aimed at making PANOS config changes easy (and XML free ;), maintainable and allowing complex scenarios like rule merging, unused object tracking, conversion of checkpoint exclusion groups, massive rule editing, AppID conversion … to name the ones I do on a regular basis and which are not offered by our GUI. It will work seamlessly on local config file or API.

Homepage : download latest sources on GitHub. Windows package with PHP binaries here: dev.zip

Requirements : PHP 5.5 with curl module

Usage: include the file lib/panconfigurator.php in your own script to load the necessary classes.

File tree:

  • /lib/ contains library files source code
  • /utils/ contains ready to run scripts, more information in utils/readme.txt
  • /doc/index.html has all classes documentations
  • /example-xxx.php are examples about using this library

With less than 20 lines of code, you should be able to solve most of your needs. Brief overview:

Loading a config from a file :

    $pan = new PANConf();
    $pan->load_from_file('myconfig.xml');

Prefer to load it from API candidate config ?

    $connector = panAPIConnector::findOrCreateConnectorFromHost('fw1.mycompany.com');
    $pan = new PANConf();
    $pan->API_load_from_candidate($connector);

Delete unused objects from a config :

    foreach($pan->addressStore->addressObjects() as $object )
      if( $object->countReferences() == 0 )
        $pan->addressStore->remove($object);

Want to know where an object is used ?

    $object = $pan->addressStore->find('H-WebServer4');
    foreach( $object->getReferences() as $ref )
       print $ref->toString()."\n";

Replace that object by another one :

    $object->replaceMeGlobally($anotherObject);

Want to add security profile group 'Block-Forward-Critical-High' in rules which have destination zone 'External' and source zone 'DMZ'?

    foreach( $vsys1->securityRules->rules() as $rule )
       if( $rule->from->has('DMZ') && $rule->to->has('External') )
           $rule->setSecurityProfileGroup('Block-Forward-Critical-High');

Do you hate scripting ? Utility script 'rules-edit.php' is a swiss knife to edit rules and takes advantage of PAN Configurator library from a single CLI query, ie :

Do you want to enable log at start for rule going to DMZ zone and that has only object group 'Webfarms' as a destination ?

rules-edit.php in=api://fw1.mycompany.com actions=logStart-Enable 'filter=(to has dmz) and (dst has.only Webfarms)'

You are not sure about your filter and want to see rules before making changes ? Use action 'display' :

rules-edit.php  in=api://fw1.mycompany.com actions=display 'filter=(to has dmz) and (dst has.only Webfarms)'

Change all rules using Application + Any service to application default ?

rules-edit.php in=api://fw1.mycompany.com actions=service-Set-AppDefault 'filter=!(app is.any) and (service is.any)'

Move post-SecurityRules with source zone 'dmz' or source object 'Admin-networks' to pre-Security rule ?

rules-edit.php  in=api://panorama.mycompany.com actions=invertPreAndPost 'filter=((from has dmz) or (source has Admin-networks) and (rule is.postrule))'

Want to know what actions are supported ?

rules-edit.php  listActions
rules-edit.php listFilters
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].