A simple tool to automatically update Hetzner firewall rules when your IP changes. Perfect for users without a static IP who want to restrict access to specific applications without using a VPN.
- The application pings a specified host (with your firewall configured to accept pings only from your IP).
- If the host does not respond, it detects that your IP has changed.
- The tool then updates the Hetzner firewall rules via API to allow your new IP.
You can update multiple firewalls at once by passing their names as parameters:
firewall-updater firewall-1 firewall-2 firewall-3Create a .env file with the following variables:
HETZNER_TOKEN=your-hetzner-api-token
HOST=host-to-ping
HETZNER_TOKEN: Your Hetzner API token.HOST: The host you want the application to ping.