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.5.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

openct-0.1.5-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file openct-0.1.5.tar.gz.

File metadata

  • Download URL: openct-0.1.5.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for openct-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1aeb228a95ecb68083463b3a7f2c3f6f3804081ce2134bbae7a36bea74f840a1
MD5 54c818fba9a0ea8855b0fe4e80355965
BLAKE2b-256 de0ea6525213850d195fcb8bc77afb25e80f608202dfdd0471a2a865f601eb7f

See more details on using hashes here.

File details

Details for the file openct-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: openct-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for openct-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 27a70976aeccca4ae1b75a0c72d80021a1a9362448bb1efab6f0a82ebc5fe8fe
MD5 9d75c31390bbff49e3ac8c9a63a1c63b
BLAKE2b-256 36654a02dfbe6cfa4f1e33b0619040c037c616405d7c23bf86f6d71c39a8fec0

See more details on using hashes here.

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