Skip to main content

Automated pfSense backup management tool

Project description

pfSentinel

CI GitHub Release License: MIT Python

Automated backup and monitoring tool for pfSense firewalls. Built for homelabs.

pfSentinel connects to your pfSense devices over SSH or HTTPS and backs up configuration files, RRD data, package configs, DHCP leases, certificates, logs, ZFS snapshots, and full filesystem archives. It includes change detection, compression, scheduled backups, and notifications via Telegram, Slack, or Windows toast.

Features

  • Full config backup via SSH (SFTP) or HTTPS with CSRF-aware login
  • Extended backup targets -- RRD graphs, package configs, DHCP leases, alias files, certificates, system logs
  • ZFS snapshots with incremental send (pfSense 2.5+)
  • Filesystem archives (tar.gz) as a non-ZFS fallback
  • Change detection -- only saves when config sections actually change
  • SHA-256 verification for every backup file
  • Scheduled backups via Windows Task Scheduler or cron
  • Notifications -- Telegram, Slack, Windows toast, Windows Event Log
  • SSH key authentication -- no password required
  • Credential security -- passwords stored in OS keyring, never in config files
  • Self-update -- check for and install new releases from GitHub
  • Cross-platform -- Windows, Linux, macOS

Quick Start

Download a pre-built binary (no Python required):

Windows (pfs.exe) | Linux (pfs)

Or install with pip (Python 3.13+):

pip install pfsentinel

Then:

pfs setup          # guided first-time wizard
pfs device add     # add your pfSense device
pfs backup run     # run your first backup

See the Installation Guide for all installation methods.

Documentation

Document Description
Installation Guide pip, pre-built binary, and from-source installation
Usage Guide CLI reference, configuration, scheduling, notifications
Extended Backups RRD, packages, DHCP, certs, logs, ZFS, archives
Security Policy Vulnerability reporting, design decisions, credential storage
Contributing Development setup, code style, pull requests
Changelog Version history

What Gets Backed Up

Target Method Description
XML Config SSH / HTTPS Full pfSense configuration (config.xml)
RRD Data SSH Traffic and performance graphs
Package Configs SSH Installed package settings
DHCP Leases SSH Active DHCP lease table
Alias Files SSH URL tables and external alias files
Certificates SSH SSL/TLS certs from the filesystem
System Logs SSH Filter log, system log, custom log files
ZFS Snapshot SSH Full or incremental ZFS snapshot stream
Filesystem Archive SSH Tar archive of critical directories

Third-Party Credits

pfSentinel is built on these open-source libraries:

Library License Purpose
Typer MIT CLI framework
Rich MIT Terminal formatting
Pydantic MIT Data validation
Paramiko LGPL-2.1 SSH/SFTP connections
httpx BSD-3-Clause HTTPS requests
cryptography Apache-2.0 / BSD-3-Clause SSH key handling
Loguru MIT Logging
PyYAML MIT YAML parsing
Requests Apache-2.0 HTTP client
Packaging Apache-2.0 / BSD-2-Clause Version parsing

Paramiko is the only runtime dependency with a copyleft license (LGPL-2.1). When installed via pip, users can freely replace it. For binary releases, pfSentinel uses --onedir bundling so Paramiko remains replaceable. See docs/LICENSE_AUDIT.md for the full dependency license audit.

Contributing

Contributions are welcome! Please read the Contributing Guide before submitting a pull request.

If you find a bug or have a feature request, open an issue.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pfsentinel-0.1.0.tar.gz (117.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pfsentinel-0.1.0-py3-none-any.whl (81.3 kB view details)

Uploaded Python 3

File details

Details for the file pfsentinel-0.1.0.tar.gz.

File metadata

  • Download URL: pfsentinel-0.1.0.tar.gz
  • Upload date:
  • Size: 117.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfsentinel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2540971e85aed93cd81c1f53a77bffad934d3625c44bd0806274e3fbd96cdeb
MD5 87135d1ff77b1a0ae3162fb71bed304e
BLAKE2b-256 ffcef87af4d246432dfbc6940d936d522a7fb3bdd817359c8638af189166f202

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfsentinel-0.1.0.tar.gz:

Publisher: ci.yml on NX1X/pfSentinel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfsentinel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pfsentinel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 81.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfsentinel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca84415911fa1c3bcfe120e7c9a2ec7371a7d3027d44495dfca07e0a47a44457
MD5 b0bfc7598c9d60b5777e067aa281d3f6
BLAKE2b-256 19bd708bcaac92f2890d61c360acdd7a99f7a0252efa0bd03c80a0f977a01e5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfsentinel-0.1.0-py3-none-any.whl:

Publisher: ci.yml on NX1X/pfSentinel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page