A quick and basic Yandex DDNS updater written in Ruby.
-
Your domain needs to be delegated to Yandex DNS and its ownership verified
-
The script assumes that you have a single A type record pointing to @ (root domain) in the Yandex DNS editor for your domain. The script does not currently handle multiple A records (if multiple records exist, the first randomly encountered one would be updated)
-
Since DDNS is likely to accompany often changing public IP addresses, the default SOA record values set by Yandex are too high for fast DNS propagation. I recommend lowering REFRESH, RETRY, MINIMUM and TTL to
300
in the DNS editor
# Copy example config file
cp config.json.example config.json
Set domain
and pdd_token
values in config.json
An API token for your domain can be obtained here
last_ip
provides a key for comparing the current and previously set IP addresses. It is modified by the script on each successful run. This is so we don't make useless API calls when the IP hasn't changed.
# Install bundler
gem install bundler
# Install dependencies
bundle install --path vendor/bundle
# Run the script
bundle exec yandex-ddns
// TODO (cron & systemd)
- Yandex DNS hosting
- Yandex.Mail for Domain API / Documentation / API access
- Yandex.Mail for Domain API / Documentation / Managing DNS
- populov/yandex-ddns-sh (Shell)
- thekvs/yandex-ddns (Go)
This software comes with no warranties.