https://github.com/ryanflannery/gddnsu
Script to batch update Google Domains configured for dynamic DNS
https://github.com/ryanflannery/gddnsu
Last synced: about 1 year ago
JSON representation
Script to batch update Google Domains configured for dynamic DNS
- Host: GitHub
- URL: https://github.com/ryanflannery/gddnsu
- Owner: ryanflannery
- License: bsd-2-clause
- Created: 2017-06-07T01:57:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-07T04:01:32.000Z (about 9 years ago)
- Last Synced: 2025-06-29T22:40:25.190Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gddnsu
A small script to update google domains configured for dynamic DNS
## what is it?
gddnsu is a simple script to update your google domains configured for dynamic
dns to your external ip address. It reads a list of domains and credentials
(username and password pairs, generated by google domains) from a file,
determines your external IP address, and updates those domains to your external
IP with [Google Domains](https://domains.google.com)
It aims to support batch updates of domains while minimizing calls to services
like [ipinfo.io](https://ipinfo.io).
## is this really needed?
For 99% of cases, where you need to update just a single domain, no...this is
overkill. For those cases the following two line shell script would suffice:
```sh
ip=`curl -s ipinfo.io/ip`
curl -s "https://YourUsername:YourPassword@domains.google.com/nic/update?hostname=YourDomain&myip=${ip}"
```
where `YourDomain` is registered with google domains and you've configured it
for dynamic dns updates, following
[this guide](https://support.google.com/domains/answer/6147083).
After following that guide, google domains will generate `YourUsername`
and `YourPassword` pairs for you (and can regenerate them if you ever feel
they are compromised).
## so then why this?
If you have an environment where others can route (sub)domains and have them
configured using various dynamic DNS services and want to support google
domains, then this might be a good fit.
## usage
For basic usage, just run (probably via `cron` or similar) the command
`gddnsu /path/to/gddnsu.conf`. See `sample.conf` for what `gddnsu.conf` looks
like. It's a simple file where each line is of the form
```
domain username password
```
where `domain` is registered with google domains and `username` and `password`
are the credentials provided there for dynamic DNS updates.
See [this guide](https://support.google.com/domains/answer/6147083) for
details.
Blank lines and comment lines (starting with `#`) are ignored.