Skip to content

kirov117/yandex-ddns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yandex-ddns

A quick and basic Yandex DDNS updater written in Ruby.

Prerequisites

  • 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

Usage

# 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

Scheduling

// TODO (cron & systemd)

Useful reads

Alternatives

License

Apache 2.0

This software comes with no warranties.

Releases

No releases published

Packages

No packages published