olivierb46/PyFRC2G
Sobre
Python scripts to convert PfSense and OPNSense firewall rules into a graphical view of the flows.
Segurança e privacidadeCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +3
- em 15 dias
- +5
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalPyFRC2G - Unified Firewall Rules to Graph Converter
Convert firewall rules into graphical flow diagrams, audit and compliance reports. Read the rules live through the API or from a backup / configuration file, then get the flows as graphs, a risk score, the audit findings, the changes since the last run and ready-to-send PDF / HTML / Excel / CSV reports.
| Firewall | Live (API) | Backup / configuration file |
|---|---|---|
| pfSense | ✅ REST API package | config.xml |
| OPNsense | ✅ | config.xml |
| nfSensei | ✅ read-only API key | running.yaml of a backup (or the whole backup archive), JSON / YAML configuration |
| FortiGate | configuration file (.conf) |
|
| iptables | iptables-save -c |
|
| nftables | nft -j list ruleset |
|
| Stormshield (experimental) | ConfigFiles archive (.zip / .tar.gz) |
The format of a file is detected automatically. In the web application, a firewall with an API is added once and analysed on a schedule; a backup file is uploaded and kept as its own firewall.

🖼️ Overview
📦 Repository content
| Folder | Package | What it is |
|---|---|---|
engine/ |
pyfrc2g |
The engine and the command line tool: parsers, audit, change report, compliance policy, risk score, zone matrix, graphs, PDF / HTML / Excel / CSV reports, CISO Assistant upload. Everything you need without a web interface. |
web/ |
pyfrc2g-web |
The web application (Flask), which uses the engine: dashboard per environment, charts and graphs per firewall, API firewalls and uploaded files, four roles with per-firewall scopes, optional OpenID Connect sign-in and two-factor authentication, accepted risks with approval, renewal, history and expiry, validation of the rule changes, temporary rules, remediation tracking, executive report, trends, rule review, cleanup plan, rule simulation, flow search, global search, compliance mapping, REST API and Prometheus metrics, alerts and scheduled reports by email, SIEM export, encrypted backups, data encrypted in SQLite. |
Full documentation: engine/README.md and web/README.md.
How the analysis works and how to read the results (risk score, findings, accepted risks, reports, CISO Assistant): HOW_IT_WORKS.md (also shown in the web application, page How it works).
🚀 Quick start
Command line (engine)
git clone https://github.com/olivierb46/PyFRC2G.git
cd PyFRC2G/engine
pip install . # Graphviz must be installed on the system
pyfrc2g --backup config.xml # a backup file: reports in results/<firewall>/
pyfrc2g # API mode (pfSense, OPNsense, nfSensei): firewalls set in .env / config.py
Without cloning: pip install "pyfrc2g @ git+https://github.com/olivierb46/PyFRC2G.git#subdirectory=engine".
Docker image of the command line: see engine/Dockerfile.
Web application
git clone https://github.com/olivierb46/PyFRC2G.git
cd PyFRC2G/web
cp .env.example .env # set PYFRC2G_REDIS_PASSWORD; put the TLS certificate in nginx/certs/
docker compose up -d --build # https://localhost/ (nginx and Redis start with it)
The web application runs with Docker only (prerequisites: a TLS certificate and a Redis password, see web/README.md); the engine and its command line also install with pip (above).
Then add an API firewall (Administration > API firewalls) or upload a backup file (Configuration files).
📄 License
MIT, see LICENSE.
Explore projetos relacionados
Carregando…















