A simple CLI for cleaning automated access to hetzner firewalls
Project description
hetzner-fireaccess-cleaner
This CLI is to be used with clearing automated access to a Hetzner firewall
Getting started
pip install hetzner-fireaccess-cleaner
How does it work?
This script is made to be run by an automation, like crontab.
It's looking for the string auto-expire-[]
where we have a timestamp to when the listed rule should expire in UNIX time.
Example: auto-expire-[1647127315]
Remote access for USER - auto-expire-[1647127315]
It uses the default hcloud CLI config file. https://github.com/hetznercloud/cli
How you implement and use this is up to you.
Usage
hetzner-fireaccess-cleaner clean [FIREWALL NAME]
For more info about available flags, checkout out the help hetzner-fireaccess-cleaner -h
.
Examples
Clean the firewall firewall-1
hetzner-fireaccess-cleaner clean firewall-1
Using a different context than the current active
hetzner-fireaccess-cleaner --context access-project clean remote-firewall
DEMO
$ hetzner-fireaccess-cleaner clean remote-firewall
No context provided, using default
Rule marked for removal: A rule which is expored auto-expire-[1647127315]
Removing rules
Finished
Contributions
Contributions are welcome.
Disclaimer
This has not yet been tested a lot and only on a small hetzner account, use with caution.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hetzner-fireaccess-cleaner-0.0.1.tar.gz
.
File metadata
- Download URL: hetzner-fireaccess-cleaner-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e01ccf9bc5b52e961ea13f640d26ab182e3f3641ea2b57ed210f266660be493b |
|
MD5 | 280f9aff834690b8154bbe6dc6cd3ca6 |
|
BLAKE2b-256 | dc349ee7475b1cd7fc5058a517f32dee4487cbafb537a05e17240616671b417d |
File details
Details for the file hetzner_fireaccess_cleaner-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: hetzner_fireaccess_cleaner-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d71b955c07ff8c9c2913d18c97349233542b859df74c6a2ccf379c8b734a1755 |
|
MD5 | 94ba97885185b2d53775e76cb9d5170b |
|
BLAKE2b-256 | 428bf754c17c3c1a618d90a29d13d2b7ef7f4653d4ca76c676b1d42b29a2c1f3 |