Skip to main content

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.

Release files for openct 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openct 0.1.8
File Size Uploaded
openct-0.1.8.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openct 0.1.8
File Interpreter ABI Platform
openct-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 38.9 kB

Release files / openct-0.1.8.tar.gz

Download URL openct-0.1.8.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f58ff79624c565e5486c1beb9572c5f27b8903ec9a1e2790f07cb854f8910e03
BLAKE2b-256 checksum
How to use checksums
fba94ba1e65a80001d11cc75920b5b689e053545618ad6a5c0dc093ba4ef888f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / openct-0.1.8-py3-none-any.whl

Download URL openct-0.1.8-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6e0e7cb251d8bd35e18b042ab2febae51f04c50d90547261947ac9811216058
BLAKE2b-256 checksum
How to use checksums
44a95110a82935c793d1ecfa3e1bbcca3fbc1b9f9a9794ca54470ed68e93d4c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page