Automatic Firewall Updater for DigitalOcean with Target Server Monitoring
480
Description:
This Docker image provides a robust solution for automatically maintaining firewall rules on your DigitalOcean droplets. It leverages the doctl CLI tool and server reachability checks to ensure your firewall is always up-to-date with your current IP address.
Key Features:
CHECK_INTERVAL_SECONDS environment variable).doctl CLI tool.CHECK_INTERVAL_SECONDS environment variable to tailor the monitoring frequency to your specific needs.Benefits:
How to Use:
Set Environment Variables:
DIGITAL_OCEAN_TOKEN: Your DigitalOcean API access token (obtainable from the DigitalOcean control panel).DIGITAL_OCEAN_FIREWALL_ID: The ID of the firewall you want to update.TARGET_HOST: The hostname or IP address of the target server to monitor.TARGET_PORT (optional): The port on the target server used for communication (defaults to 1883 for MQTT).CHECK_INTERVAL_SECONDS (optional): The frequency (in seconds) at which to check the target server's reachability (defaults to a reasonable value).Build the Image (Optional):
docker build -t your_username/firewall-updater .
Run the Container:
docker run -d --env-file .env your_username/firewall-updater
Replace your_username/firewall-updater with the actual image name you built or used from Docker Hub. You can also create a .env file to store your environment variables for easier management.
Additional Notes:
CHECK_INTERVAL_SECONDS environment variable to strike a balance between efficient monitoring and minimizing API calls.Content type
Image
Digest
sha256:00ca5956a…
Size
23.8 MB
Last updated
over 2 years ago
docker pull alexmikhalochkin/do-firewall-updater