Skip to main content

Configuration backup and analysis tools for devices running pfSense and RouterOS

Project description

pylint pytest

openct

Configuration backup and analysis* tools for devices running pfSense* and RouterOS.

* aspirational

Installation

Run as root

mkdir /opt/openct
cd /opt/openct
apt update
apt install python3.11 python3.11-venv
python3.11 -m venv .venv
. .venv/bin/activate
pip install pip --upgrade
python -m pip install openct

Setup

SSH Keys

  1. Create a key pair in the project root folder
  2. Copy the public key to the target routers
  3. Add the private key to the config.yml file below

Creating a configuration file:

python -m openct.setup

Edit the configuration file:

nano config.yml

Datastore

mkdir -p datastore
touch datastore/datastore.yml
mkdir -p logs

Add the target routers to the datastore in the following format:

- "0.0.0.0"
- "10.10.10.10"
- "192.168.0.1

Create a script to make running easier

For example in run-openct.py:

#!/opt/openct/.venv/bin/python

import runpy
runpy.run_module(mod_name='openct')

Make it executable:

chmod +x run-openct.py

Then run it:

./run-openct.py

Contributing

Feedback

License

Copyright (c) Weehooey Inc. All rights reserved.

Licensed under the GNU GPL v3.0 license.

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

openct-0.1.8.tar.gz (18.2 kB view hashes)

Uploaded Source

Built Distribution

openct-0.1.8-py3-none-any.whl (20.7 kB view hashes)

Uploaded Python 3

Supported by

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