Skip to Content
IntegrationsCloud

Secure Hetzner Cloud with Mondoo

Continuously secure your Hetzner Cloud project with Mondoo.

To connect a Hetzner Cloud project to Mondoo, you create an API token for the project and add it to a Hetzner Cloud integration in your space.

Mondoo assesses the project's servers, images and snapshots, SSH keys, volumes, networks, floating IPs, primary IPs, load balancers, firewalls, TLS certificates, placement groups, Storage Boxes (with their subaccounts and snapshots), and DNS zones and their records. It also discovers each firewall and load balancer in the project as its own asset, so you can review their findings individually.

The Mondoo Hetzner Cloud Security policy checks that:

  • Servers are attached to a private network, have at least one firewall applied, don't run a deprecated OS image, and aren't reachable from the internet.
  • SSH keys use strong algorithms and key sizes.
  • Firewalls define at least one rule, don't allow unrestricted inbound SSH (port 22), RDP (port 3389), or common database ports, and don't allow unrestricted inbound or outbound traffic on all ports.
  • Load balancers redirect HTTP traffic to HTTPS and are attached to a private network.
  • TLS certificates aren't expired, self-signed, or weakly signed.
  • Storage Boxes aren't reachable from the public internet.
  • Floating IPs and primary IPs aren't blocked by Hetzner abuse handling.

Before you begin

  • Editor or Owner access to the Mondoo space, or another role with permission to add integrations. To see every role, read Roles and permissions.
  • A Hetzner Cloud project
  • A Hetzner Cloud API token for that project

Create a Hetzner Cloud API token

Mondoo authenticates to Hetzner Cloud with a project API token.

  1. Log in to the Hetzner Cloud Console.

  2. Select the project you want Mondoo to scan.

  3. In the left navigation, choose Security > API Tokens.

  4. Generate a new token with Read permission. Mondoo only reads configuration, and a Read & Write token grants more than the integration needs.

  5. Copy the token. Hetzner Cloud shows it only once.

Treat the API token like a password. Don't commit it to source control, and rotate it periodically.

An API token is scoped to a single project. To scan several Hetzner Cloud projects, create one integration per project.

Add a Hetzner Cloud integration

You need the Editor or Owner role, or another role with this permission. To see every role, read Roles and permissions.

In the Mondoo App, navigate to the space where you want to add the integration. Some integrations can also be added once at the organization level to cover every space with one connection. To see which ones, read Set up integrations once for your whole organization.

In the space's side navigation bar, select Integrations. In the top right, select INSTALL. On the Install Integration page, find the integration you want by browsing a category or searching by name:

  1. Under Cloud Security, select Hetzner Cloud.

  2. Under Choose an integration name, enter a name that identifies the Hetzner Cloud project.

  3. Under Provide your Hetzner Cloud API token, paste the API token you created.

    The Hetzner Cloud integration form with the Choose an integration name and Provide your Hetzner Cloud API token steps

  4. (Optional) Under Enable security policies (optional), select the policies you want Mondoo to score the project against.

  5. Select CREATE INTEGRATION.

Mondoo starts the first scan as soon as the integration is created. To learn how policies work, read Manage Policies.

Manage your integration

To open the integration, navigate to the space and select Integrations in the side navigation bar. Select the Hetzner Cloud card, then choose the integration.

The status appears on the integration page under Integration Details. Active means the integration is healthy and scanning. To learn what the other statuses mean and how to fix errors, read Integration Status and Troubleshooting.

At the top of the integration page, select RUN to request a fresh scan, or select the ... (more integration actions) button and then Pause to stop scheduled scans (Resume starts them again).

To rename the integration or replace its API token, select the edit (pencil) icon. Leave the token box empty to keep the existing token.

To remove the integration, select the trash can icon, then select DELETE in the Remove Integration dialog. Mondoo stops scanning the Hetzner Cloud project.

Scan Hetzner Cloud from the command line

The integration scans continuously from the Mondoo Platform. To scan a Hetzner Cloud project from your workstation or a CI pipeline instead, see Secure Hetzner Cloud with cnspec.

Next steps

Last updated on

On this page