A simple Dynamic DNS client for updating the public IP address of a server, written in C#.
- 💾 Download the latest release for your platform (Windows or Linux)
- ✏️ Add your dynamic DNS provider's info to the configuration file
- 🚀 Run the executable (add
-sor--silentfor skipping trace-level messages) - 🔄 (optional) Set up a recurring job to run the executable periodically for you
The default appsettings.json configuration file beside the executable contains a template with examples. The instance config parameters can be repeated as necessary for multiple domins.
| Global config parameters | Description |
|---|---|
savedStateFilePath |
the path where the last successfully updated IP address will be saved |
ipProviderUrls |
the list of APIs that provide the caller's public IP address in a simple text response |
| Instance config parameters | Description |
|---|---|
DomainName |
the domain name to update the IP for, e.g. my-domain.com |
Hosts |
the list of host records to update the IP for (generally @ for root and * for wildcard records) |
DnsApiSecret |
the API secret (if needed), issued by your dynamic DNS provider |
DnsApiUrlTemplate |
the API endpoint URL template for your dynamic DNS provider used to update the IP address for records |
DnsApiSuccessMessage |
a phrase that the content of the API response must include (optional: not checked if not set) |
Placeholders in the DnsApiUrlTemplate config parameter:
{Host}: the provided hosts will be substituted here when calling the provider's API{Domain}: the provided domain name will be substituted here when calling the provider's API{Secret}: the provided API secret will be substituted here when calling the provider's API{NewIp}: the public IP obtained from one of the providedIpProviderUrlswill be substituted here when calling the provider's API
Let's assume that the Linux x64 version was downloaded and unzipped to your ~/dyn-dns directory and the necessary info was written to the .config file in the same directory.
After all that, give execution rights to the application:
user@server:~/dyn-dns$ sudo chmod +x DynamicDnsClientAll you have to do to run the app periodically is to add the following line to your crontab:
*/5 * * * * cd ~/dyn-dns && ./DynamicDnsClient -s >> dyn-dns.logThis will run the application every 5 minutes, and write the output to a dyn-dns.log file.