A toolkit to parse Fortigate CLI configuration and generate structured data.
The toolkit parses the output of the following Fortigate CLI commands:
- show system interface
- show firewall address
- show firewall addrgrp
- show firewall service custom
- show firewall service group
- show firewall policy
- show router static
If using pip,
git clone https://github.com/SudarshanVK/fortigate-config-parser.git
cd fortigate-config-parser
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
If using poetry,
git clone https://github.com/SudarshanVK/fortigate-config-parser.git
cd fortigate-config-parser
poetry install
source .venv/bin/activate
The script requires the path to the configuration file as an argument.
python app/main.py --help
Usage: main.py [OPTIONS]
Options:
-c, --configuration TEXT Path to configuration file [required]
--help Show this message and exit.
A sample execution screenshot is as below
The toolkit outputs the parsed configuration in three formats: JSON, YAML and XLSX. The outputs are stored in a dedicated folder in the parent directory.
Sample outputs can be found here
Sudarshan Vijaya Kumar