olivierb46/PyFRC2G
Acerca de
Scripts de Python para convertir las reglas del cortafuegos de PfSense y OPNSense en una representación gráfica de los flujos.
Seguridad y privacidadCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- +3
- in 15 days
- +5
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
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.
Explorar proyectos relacionados
Cargando…















