modernleft-docs/Applications/fail2ban-manager/plugins/hetzner.md

177 lines
3.4 KiB
Markdown
Raw Normal View History

2025-01-17 16:27:10 +00:00
---
title: fail2ban-manager plugin - hetzner
draft: true
date: 2025-01-16
---
2025-01-13 04:17:24 +00:00
**Usage**:
```console
$ fail2ban-manager hetzner [OPTIONS] COMMAND [ARGS]...
```
**Options**:
- `--help`: Show this message and exit.
**Commands**:
- `info`: Check the status of the Hetzner plugin.
- `update`: Update the configuration.
- `reset`: Reset the configuration to defaults.
- `token`: Set Hetzner API token.
- `firewall-info`: Pull the firewalls from the server.
- `whitelist`: Whitelist an IP address.
- `whitelist-cloudflare`: Whitelist Cloudflare IP addresses.
- `delete-rule`: Delete a firewall rule.
## `fail2ban-manager hetzner info`
Check the status of the Hetzner plugin.
**Usage**:
```console
$ fail2ban-manager hetzner info [OPTIONS]
```
**Options**:
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner update`
Update the configuration.
**Usage**:
```console
$ fail2ban-manager hetzner update [OPTIONS]
```
**Options**:
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner reset`
Reset the configuration to defaults.
**Usage**:
```console
$ fail2ban-manager hetzner reset [OPTIONS]
```
**Options**:
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner token`
Set Hetzner API token.
Warning: If token_str is specified, it will be save in plaintext in the database.
**Usage**:
```console
$ fail2ban-manager hetzner token [OPTIONS] [TOKEN_STR]
```
**Arguments**:
- `[TOKEN_STR]`: The Hetzner API token.
**Options**:
- `--use-env`: Use the `HETZNER_TOKEN` environment variable.
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner firewall-info`
Pull the firewalls from the server.
**Usage**:
```console
$ fail2ban-manager hetzner firewall-info [OPTIONS] FIREWALL_ID
```
**Arguments**:
- `FIREWALL_ID`: The ID of the firewall to pull from the server. [required]
**Options**:
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner whitelist`
Whitelist an IP address.
## Examples
fail2ban-manager hetzner whitelist <FIREWALLID> --self
fail2ban-manager hetzner whitelist <FIREWALLID> <IP>
**Usage**:
```console
$ fail2ban-manager hetzner whitelist [OPTIONS] FIREWALL_ID [IP] [PORT]
```
**Arguments**:
- `FIREWALL_ID`: The ID of the firewall to pull from the server. [required]
- `[IP]`: An IP to whitelist.
- `[PORT]`: any, 443, 80-85 [default: any]
**Options**:
- `--self`: Whitelist the External IP of the current machine.
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner whitelist-cloudflare`
Whitelist Cloudflare IP addresses.
**Usage**:
```console
$ fail2ban-manager hetzner whitelist-cloudflare [OPTIONS] FIREWALL_ID [PORT]
```
**Arguments**:
- `FIREWALL_ID`: The ID of the firewall to pull from the server. [required]
- `[PORT]`: any, 443, 80-85 [default: 443]
**Options**:
- `--help`: Show this message and exit.
## `fail2ban-manager hetzner delete-rule`
Delete a firewall rule.
## Examples
fail2ban-manager hetzner delete-rule <FIREWALLID> "fail2ban-manager whitelist - <PORT>"
fail2ban-manager hetzner delete-rule <FIREWALLID> "fail2ban-manager cloudflare whitelist - <PORT>"
**Usage**:
```console
$ fail2ban-manager hetzner delete-rule [OPTIONS] FIREWALL_ID DESCRIPTION
```
**Arguments**:
- `FIREWALL_ID`: The ID of the firewall to pull from the server. [required]
- `DESCRIPTION`: The description of the rule to delete. [required]
**Options**:
- `--help`: Show this message and exit.