Skip to content

Python script to extract rules from the ACP in a CVS format looking into all the information within an object using API.

License

Notifications You must be signed in to change notification settings

i-am-csr/fmc_policy_viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python3 status license published

FMC Policy Viewer

A script to collect the rules within an Access Control Policy, it will return a CSV file with the information about the rules also expanding all the objects within that rule. It uses the fireREST library to collect the data from the FMC.

Requirements

  • fireREST==1.0.10
  • pandas==1.4.1
  • requests==2.27.1

Usage

For now, modify in the script the variable management_center with the information from your environment. i.e.

management_center = {
    “ip_address”: “192.168.1.200”,
    “username”: “admin”,
    “password”: “Admin123”,
    “domain”: “Global”
}

If there is a need to use a child domain, add a / (forward slash) after the word Global.

Execution

The command to execute the script is:

python3 fmc_policy_viewer.py
--------------------------------------------------
Welcome
--------------------------------------------------
Getting access to the FMC
--------------------------------------------------
Reading rules from the ACP FTD
Finished - Read 6 rules
--------------------------------------------------
Collecting objects...
--------------------------------------------------
Getting Object Host
Getting Object Networks
Getting Group Networks
Getting ranges
Getting fqdn
Getting port
Getting port object group
Getting protocol port object
--------------------------------------------------
Building the ACP output...
Finished...
--------------------------------------------------
Creating CSV file
Done, CSV file "FTD.csv" has been created

Upcoming features

In the next stage, we will see:

  • HTML output with the ACP information

Authors

Cesar Barrientos ([email protected])

License

GNU General Public License v3.0 or later.

See LICENSE for the full text.

About

Python script to extract rules from the ACP in a CVS format looking into all the information within an object using API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages