Command line client for DETERRERS
A command line client making it easy to interact with the DETERRERS perimeter firewall portal to registr and configuration IP addresses and firewall profiles.
Warning: The API of DETERRERS used by this tool is still experimental and somewhat fragile. Most notably, this often leads to unexpected errors returned by the API.
Installation
Use pip to install the latest version:
pip install deterrers-cli
Configuration
To configure the client, create a file ~/.deterrers.yml with the following content:
url: https://deterrers.example.com
token: <api-token>
# If you want to automatically register newly added hosts
# Default: false
auto-register: false
# If you want to skip the initial security scan by default.
# Default: false
auto-skip-scan: false
Usane
Use the context based help to get information about available commands:
❯ deterrers-cli --help
Usage: python -m deterrerscli [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
action Activate firewall profile or block IP address in perimeter...
add Add IP address to DETERRERS.
delete Delete IP address from DETERRERS.
get Get information about an IP address in DETERRERS.
hosts List all IPs added to DETERRERS.
update Update IP address in DETERRERS.
Help about adding new IP addresses:
❯ deterrers-cli add --help
Usage: python -m deterrerscli add [OPTIONS] IPV4
Add IP address to DETERRERS.
Options:
-a, --admin TEXT [required]
-p, --profile [|HTTP|SSH|HTTP+SSH|Multipurpose]
-f, --firewall [|UFW|FirewallD|nftables]
--help Show this message and exit.
Example
# Delete IP 192.0.0.1 from DETERRERS
❯ deterrers-cli delete 192.0.0.1
# Add IP 192.0.0.1 with group `virtUOS` as admins and firewall profile `Multipurpose`
❯ deterrers-cli add --admin virtUOS --profile multipurpose 192.0.0.1
# Set firewall profile `SSH`
❯ deterrers-cli update --profile ssh 192.0.0.1
# Activate firewall profile
❯ deterrers-cli action register 192.0.0.1
Shell Completion
The deterrers-cli command line tool supports shell completion for several major shells:
For Bash, add to ~/.bashrc:
eval "$(_DETERRERS_CLI_COMPLETE=bash_source deterrers-cli)"
For ZSH, add to ~/.zshrc:
eval "$(_DETERRERS_CLI_COMPLETE=zsh_source deterrers-cli)"
For fish, add to ~/.config/fish/completions/deterrers-cli.fish:
_DETERRERS_CLI_COMPLETE=fish_source deterrers-cli | source
Metadata
Release files for deterrers-cli 0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| deterrers-cli-0.8.tar.gz | 4.7 kB | Without provenance | Details |
Release files / deterrers-cli-0.8.tar.gz
| Download URL | deterrers-cli-0.8.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62f707544ea3ea8c50018bd32a2bdd1d3ba41117025ba45bcf968a9902a4f2ab
|
|
BLAKE2b-256 checksum How to use checksums |
1129ab39d0423f97f9eb673f5dab898208831f1371a144aaec34a02f9e9af0f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.4
|
Security for deterrers-cli 0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.