# OPNsense SSH Diagnostic Tool A Python tool to connect to OPNsense/FreeBSD firewalls via SSH, collect logs and configs, and diagnose crash issues. ## Setup ```powershell cd opnsense-server pip install -r requirements.txt ``` ## Usage ```powershell # Run full diagnostic python diagnose.py # Just collect logs python diagnose.py --collect-only # Analyze existing logs python diagnose.py --analyze-only ``` ## Configuration Edit `config.py` to set: - SSH host, port, username - SSH key path or password - Log collection paths ## Collected Data - `/var/log/system.log` - System messages - `/var/log/filter.log` - Firewall filter log - `/var/log/portalauth.log` - Portal auth log - `/var/crash/` - Crash dumps - `/var/run/dmesg.boot` - Boot messages - Memory and process statistics - OPNsense config backup