{"id":13599526,"url":"https://github.com/TKCERT/pfFocus","last_synced_at":"2025-04-10T13:30:39.887Z","repository":{"id":47160545,"uuid":"99909560","full_name":"TKCERT/pfFocus","owner":"TKCERT","description":"Generate meaningful output from your pfSense configuration backup, like Markdown documentation.","archived":false,"fork":false,"pushed_at":"2023-09-13T15:40:34.000Z","size":350,"stargazers_count":308,"open_issues_count":2,"forks_count":32,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-07T00:43:22.729Z","etag":null,"topics":["configuration-backup","documentation","documentation-generator","firewalls","pfsense","pfsense-backup","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TKCERT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-10T10:06:20.000Z","updated_at":"2024-11-03T18:55:11.000Z","dependencies_parsed_at":"2024-06-09T20:44:36.334Z","dependency_job_id":null,"html_url":"https://github.com/TKCERT/pfFocus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TKCERT%2FpfFocus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TKCERT%2FpfFocus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TKCERT%2FpfFocus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TKCERT%2FpfFocus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TKCERT","download_url":"https://codeload.github.com/TKCERT/pfFocus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225705,"owners_count":21068078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-backup","documentation","documentation-generator","firewalls","pfsense","pfsense-backup","python"],"created_at":"2024-08-01T17:01:05.929Z","updated_at":"2025-04-10T13:30:39.447Z","avatar_url":"https://github.com/TKCERT.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![pfFocus](logos/pfFocus.png)\n\n# pfFocus\n\n[![Check](https://github.com/TKCERT/pfFocus/actions/workflows/check.yml/badge.svg)](https://github.com/TKCERT/pfFocus/actions/workflows/check.yml)\n[![Docker](https://github.com/TKCERT/pfFocus/actions/workflows/docker.yml/badge.svg)](https://github.com/TKCERT/pfFocus/actions/workflows/docker.yml)\n\nThis simple tool allows you to convert a full configuration backup of a *pf*Sense firewall into some meaningful output format, like Markdown or YAML. It enables you to **focus** on the important parts of your firewall configuration and allows you to get a quick overview of the most important settings.\n\n## Requirements\n\n* Python 3.6+\n    * defusedxml==0.5.0\n    * PyYAML==5.4\n\n## Screenshots\n\n**Before:** Configuration backup as XML\n\n![Configuration backup as XML](screenshots/pfFocus_xml.png)\n\n**After:** Markdown documentation\n\n![System and Interfaces](screenshots/pfFocus_System_Interfaces.png)\n![Filter rules](screenshots/pfFocus_Filter_rules.png)\n\n## Features\n\npfFocus currently supports the following configuration sections:\n\n* Basic system information\n* List of interfaces, VLANs, bridges, gateways and static mappings\n* List of DHCP ranges and aliases\n* NAT rules with alias and interface resolution\n* Outbound NAT rules with alias and interface resolution\n* Filter rules with alias and interface resolution\n* DNS forwarder (DNSmasq) configuration\n* OpenVPN server and client configurations\n* Syslog and sysctl configuration\n\n## Installation\n\nInstall into existing Python environment:\n```bash\npip install git+https://github.com/TKCERT/pfFocus.git#egg=pfFocus\n```\n\nCombine this with `--user` or `pipx` or `pipenv` for isolated installation.\n\n## Usage\n\nMain formatting tool: ```pf-format```\n```bash\npf-format\n```\n\nExamples:\n```bash\npf-format -i config-backup.xml -f md -o test.md\npf-format -i config-backup.xml -f yaml -o test.yaml\n```\n\nTest parsing tool: ```pf-parse```\n```bash\npf-parse [-h] input_path\n```\n\nExamples:\n```bash\npf-parse config-backup.xml\n```\n\n### Usage via Docker\n\nWhen using pfFocus via Docker, you don't need to download it from Github, and you don't need to install Python or any libraries. Only Docker is required.\n\nIt runs this command inside Docker: `pfFocus-format -q -f md -i - -o -`, which means it works with `STDIN` and `STDOUT` instead of files.\n\n```bash\ndocker run --rm -i ghcr.io/tkcert/pffocus \u003c input.xml \u003e output.md\n```\n\nIf you want you can set up an alias for it in bash:\n\n```bash\nalias pf-format=\"docker run --rm -i ghcr.io/tkcert/pffocus\"\n```\n\nThen you can use it like a normal Unix command, with pipes and redirects:\n\n```bash\npf-format \u003c input.xml \u003e output.md\n```\n\n## Roadmap\n\nSome ideas for the future development of pfFocus:\n\n* Producing additional output formats, especially structured formats like CSV.\n* Using these structured formats to enable easy diff'ing of configurations.\n* Maybe functionality to correlate rule configurations of different firewalls.\n\n## Credits\n\n* Thomas Patzke ([@thomaspatzke](https://github.com/thomaspatzke)) for\n    * valuable suggestions and feedback\n* Florian Roth ([@Cyb3rOps](https://twitter.com/Cyb3rOps)) for\n    * giving it the name *pfFocus*\n    * the very nice and gorgeous logo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTKCERT%2FpfFocus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTKCERT%2FpfFocus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTKCERT%2FpfFocus/lists"}