This is a trivial dynamic DNS updater for Oracle Cloud: the idea is to deploy this to OKE and have a simple HTTPS API endpoint to register my home IP address as a DNS record in the DNS zone served by Oracle DNS.
- I want to be able to connect to my home server, and my home IP address changes frequently.
- Existing dynamic DNS services introduce an additional point of failure, I'd rather not add complexity where it's not needed.
- Oracle DNS does not support standard dynamic DNS protocols (RFC 2136, etc.).
- Calling
curl
in DHCP client hook or just as a cronjob is incredibly simple. - I wanted to write something somewhat useful to get my feet wet with Go.
Either build the executable manually, or use the provided container image. Two command-line parameters are supported:
Usage of ./oci-dyndns:
-config string
Configuration file name (default "config.json")
-listen string
Address and port to listen to (default ":8080")
The configuration file is expected to contain the following:
{
"zone": "DNS zone to update",
"host": "Host name to update, FQDN",
"username": "HTTP authentication user name",
"password": "HTTP authentication password",
"oci": {
"tenancy" : "OCI user credentials that can update DNS records",
"user" : "",
"region" : "",
"fingerprint" : "",
"privateKey" : ""
}
}
Only one endpoint is available: GET /nic/update
. The HTTP basic authentication is expected. Example:
curl 'https://username:password@my-domain/nic/update'