Skip to content

C# Windows Service to update your Google Domains Dynamic DNS for your Google hosted domains

License

Notifications You must be signed in to change notification settings

cp79shark/GoogleDomainsDdnsService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoogleDomainsDdnsService

C# Windows Service (.NET Framework 4.6) to update your Google Domains Dynamic DNS subdomains for your Google hosted domains

Build it yourself or grab the binaries

What is this for?

If you want to host a service (web site, etc) on your local connection, but your ISP issues you a dynamic IP address, you'll need a way to update your DNS entry for the service so that the outside world knows that XYZ.blah.com has a new IP address.

That's where this comes in, but only for domains hosted by Google.

If you're using Google Domains as your domain registrar, you can specify a Dynamic DNS subdomain. Log in to https://domains.google.com/ and click on DNS for your domain. There will be a Synthetic records section. Change the dropdown to Dynamic DNS and enter a subdomain. [ XYZ ] .blah.com. Click Add.

You now have a Dynamic DNS subdomain. Expand the Dynamic DNS section for your created subdomain and click View Credentials. You'll need these to configure GoogleDomainsDdnsSvc.

Configuration File Overview

The GoogleDomainsDdnsSvc.exe.config defines the hosts and how often to update their Dynamic DNS entries. The default interval is every 24 hours an update will occur. There are five fields that make up a <domains> collection entry.

  • hostname: The host entry (xyz.blah.com) you wish to update
  • username: The generated username for the Dynamic DNS host entry from Dynamic DNS / (your subdomain) / View Credentials on the Google Domains DNS manager
  • password: The generated password for the Dynamic DNS host entry from Dynamic DNS / (your subdomain) / View Credentials on the Google Domains DNS manager
  • longDelay: Time in milliseconds between each Dynamic DNS update (Optional, default 86400000 or 24 hours)
  • shortDelay: Time in milliseconds between each Dynamic DNS update IF Google responds with a 911 or other error (Optional, default 600000 or 10 minutes)
    <googleDomains>
        <domains>
            <clear />
            <add hostname="xyz.blah.com" username="ABC123" password="ABC123" />
        </domains>
    </googleDomains>

How to Use (binaries)

  • Download/clone the contents of the build folder to a local folder (e.g. C:\ProgramFiles\GoogleDomainsDdnsSvc)
  • Add all the hostnames and credentials you have setup to utilize DynamicDNS on domains.google.com in the GoogleDomainsDdnsSvc.exe.config file
  • Open an administrator command prompt and run GoogleDomainsDdnsSvc.exe --install
  • Start your Service
  • Verify in the Application Event log that the DNS happened and enjoy

How to Use (when building)

  • Clone the repository
  • Open solution file in Visual Studio or folder/csproj in VS Code.
  • Rename App.config.sample to App.config
  • Add all the hostnames and credentials you have setup to utilize Dynamic DNS on domains.google.com for your domain
  • Build and publish to wherever you like (e.g. C:\ProgramFiles\GoogleDomainsDdnsSvc)
  • Open an administrator command prompt, navigate to where you published the service, and run GoogleDomainsDdnsSvc.exe --install
  • Start your Service (net start googleddns or open the Services app)
  • Verify in the Application Event log that the DNS update happened and enjoy

About

C# Windows Service to update your Google Domains Dynamic DNS for your Google hosted domains

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages