No description
  • Go 78.9%
  • Shell 21.1%
Find a file
Botaniker (Bot) 9dcbd52a2a Merge branch 'renovate/go-1.26.x' into 'main'
chore(deps): update go toolchain directive to v1.26.5

See merge request sheogorath/hcloud-dynfw!301
2026-07-08 07:36:02 +00:00
systemd feat(systemd): Autoamtically fall back to container image 2022-11-21 23:03:20 +01:00
vendor fix(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.44.0 2026-06-23 06:52:26 +00:00
.gitignore Add vendored modules 2021-08-02 00:02:43 +02:00
.gitlab-ci.yml chore(deps): update docker.io/library/golang docker tag to v1.26.5 2026-07-08 06:34:56 +00:00
.ko.yaml ci: Add ko config file to repository 2024-11-21 21:57:15 +01:00
.semrelrc feat(ci): Add semantic-releases to CI tooling 2021-10-10 19:28:33 +02:00
go.mod chore(deps): update go toolchain directive to v1.26.5 2026-07-08 06:35:32 +00:00
go.sum fix(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.44.0 2026-06-23 06:52:26 +00:00
LICENSE Initial commit 2021-06-09 04:57:22 +02:00
main.go fix: Use strconv as instructed by upstream 2023-12-16 14:57:29 +01:00
README.md docs: Graduate to toy project 2024-12-05 20:05:38 +01:00
renovate.json fix(config): migrate config renovate.json 2025-08-18 07:31:34 +00:00

Hetzner.Cloud Dynmaic Firewall

Disclaimer

Be aware that this is neither any official project nor suited for professional use. It's mainly a toy project playing around with Golang and the hetzner API client.

Don't cry when something breaks or eats your cat.

Build & Install

go build .

# Fetch the API token from hetzner and store it with the following command:
secret-tool store --label "hetzner-dynamic-firewall API key" com.shivering-isles.git.sheogorath.hcloud-dynfw/api.hetzner.cloud api-key

# Store the firewall ID in the from the URL: https://console.hetzner.cloud/projects/(project ID)/firewalls/<FIREWALL ID>/rules
mkdir -p ~/.config/hcloud-dynfw/
echo "HCLOUD_FIREWALL_ID=<FIREWALL ID>" > ~/.config/hcloud-dynfw/env

Build the container

The container build uses ko:

ko build .