olivierb46/PyFRC2G
关于
用于将 PfSense 和 OPNSense 防火墙规则转换为流量图形视图的 Python 脚本。
安全与隐私实测星标增长
- 24小时
- 0
- 7天
- +3
- 15天
- +5
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文PyFRC2G - 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.
探索相关项目
加载中…















