Skip to content

Parse a Juniper SRX FW configuration (in XML format) and use Dot to create visualizations.

Notifications You must be signed in to change notification settings

mikejoh/juntools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

juntools

A script that parses an Juniper SRX FW configuration (in XML format) and via Dot, using pydot, create graphs to vizualize relationships between policies, services and security zones.

I created this project back in 2012 when Juniper didn't have a good MGMT tool (pre-Space) and i wanted a way to visualize a pretty complicated setup in regards to security/NAT policies and security zones.

Required Python modules:

  • pydot (and Graphviz binaries)
  • BeautifulSoup (the one used in this case is pre-bs4)

Example

from juntools import jViz

viz = jViz("juniper-config-file.xml", verbose=True)

zone = "my-security-zone"
direction = "destination" # If direction is destination then the graphs will contain all policies destined for my-security-zone

viz.parse_conf('<policies>','</policies>')
policies, zones = viz.getpolicies()
viz.create_graph(zone,direction,gdir='/root/bin/gviz/')

viz.get_fwinfo()
viz.close_conf()

About

Parse a Juniper SRX FW configuration (in XML format) and use Dot to create visualizations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages