Skip to main content

A Élenchos command for checking the number of lines in the ruleset of nftables.

Project description

Élenchos: Check nftables

A Élenchos command for checking the number of lines in the ruleset of nftables.

Installation and Configuration

Install Élenchos if not already installed:

cd /opt

mkdir elenchos
cd elenchos

python -m venv .venv
. .venv/bin/activate
pip install elenchos

mkdir bin
ln -s ../.venv/bin/elenchos bin/elenchos

Install the check:nftables plugin:

cd /opt/elenchos
. .venv/bin/activate

pip install elenchos_check_nftables
./bin/elenchos gather-commands

Create a configuration file /etc/nrpe.d/check_nftables.cfg for nrpe:

command[check_nftables]=/opt/elenchos/bin/elenchos check:nftables <arguments>

Possible arguments are:

  • -w, --warning[=WARNING] The warning level for the number of lines in the ruleset.
  • -c, --critical[=CRITICAL] The critical level for the number of lines in the ruleset.

Allow Élenchos to list the ruleset of nftables by creating the config file /etc/sudoers.d/enlenchos_check_nftables:

Defaults !requiretty
 
nrpe ALL = (root) NOPASSWD: /usr/bin/nft list ruleset

Finally, restart the nrpe daemon:

systemctl reload nrpe

License

This project is licensed under the terms of the MIT 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

elenchos_check_nftables-1.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elenchos_check_nftables-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file elenchos_check_nftables-1.0.1.tar.gz.

File metadata

  • Download URL: elenchos_check_nftables-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.13 Linux/6.19.12-200.fc43.x86_64

File hashes

Hashes for elenchos_check_nftables-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b9536c98923b9e6df2570bc5227490a3bc66d6241a7c747daaeb375ebfd015fb
MD5 a4fed249b6b3b9e8ad1709e051896cd2
BLAKE2b-256 e16e4318077200760047fda1ec334c3881fe51855789f4e7fad90a4779c5701d

See more details on using hashes here.

File details

Details for the file elenchos_check_nftables-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for elenchos_check_nftables-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a696fca78edad3b94fd5ff1767852e242aed6ea136fac28da2c2de5730cf3205
MD5 23f679c38811304d0fa51bbb81ce4069
BLAKE2b-256 57a120c0c6a7fc6889e082e65959c55b4fc02ae71d3531bf6a685986d13888ea

See more details on using hashes here.

Supported by

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