.NET Windows Service Development
I developed the Hexle DNS Updater, a Windows Service written in C# (.NET) that automatically keeps DNS records up to date when the server’s public IP changes. The tool is designed for environments running on dynamic IP addresses, ensuring that hosted services remain accessible without manual DNS adjustments.
How it works
-
Runs as a background Windows Service.
-
Periodically checks the current public IP via a configurable API endpoint.
-
Detects changes compared to the last known IP.
-
If the IP has changed, it updates configured DNS zones automatically via the IONOS DNS API.
-
Stores configuration (API token, zones, update interval, run flag) in an XML config file under C:\ProgramData\HexleDNSUpdater.
Key Features
-
Automatic IP Monitoring: Regularly checks for IP changes using a configurable interval.
-
DNS Zone Management: Supports updating multiple zones, each mapped by zone + record ID.
-
Secure API Communication: Uses HTTPS and API tokens to authenticate requests against the IONOS DNS API.
-
Persistence: Keeps the last known IP in a local file (ip.txt) to detect changes efficiently.
-
Logging: Writes detailed logs and status updates into the Windows Event Log.
-
Self-configuring: On first run, generates a config file and folder structure for easy setup.
The Hexle DNS Updater provides a reliable, automated solution for dynamic DNS handling, reducing downtime and manual effort in managing hosted applications or services under changing IP conditions.
Additionally I wrote a Inno Setup Script that creates an installer for the service, sets it up to run automatically on system startup, and ensures all necessary files and configurations are in place.