modernleft-docs/Applications/fail2ban-manager/plugins/hetzner.md
2025-01-15 20:58:22 -05:00

3.4 KiB

fail2ban-manager hetzner

Usage:

$ 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:

$ fail2ban-manager hetzner info [OPTIONS]

Options:

  • --help: Show this message and exit.

fail2ban-manager hetzner update

Update the configuration.

Usage:

$ fail2ban-manager hetzner update [OPTIONS]

Options:

  • --help: Show this message and exit.

fail2ban-manager hetzner reset

Reset the configuration to defaults.

Usage:

$ 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:

$ 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:

$ 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:

$ 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:

$ 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:

$ 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.