Skip to content

thekvs/yandex-ddns

Repository files navigation

Use Yandex.Connect DNS as a dynamic DNS service

This utility uses Yandex.Connect DNS service API to set external IP address for your domain. You can use this tool to manage external IP for your domain if it has internet connection with changeable IP address. To determine your external IP address utility uses myexternalip.com and ifconfig.co services.

Requirements

Domain you want to use with this utility has to be managed by Yandex DNS service. Here is some instructions in Russian.

Installing

Build Status

This project is written in the Go programming language and to build it you need to install Go compiler version 1.12 or higher. To compile project just run make in the root of the repository. Compiled binary will be located in the bin subfolder.

Configuration file options

yandex-ddns uses TOML format for configuration file. Below is a list of supported configuration options.

  • token -- Yandex DNS API token. This is a mandatory option.
  • domain -- Main domain registered at Yandex DNS. This is a mandatory option.
  • subdomain -- Subdomain of the registered domain, leave empty if you want to use main domain.
  • ttl -- TTL value for the DNS record which has to be in the range [900, 1209600], if omitted current default value is used.
  • logfile -- File where to write logs, if omitted messages will be printen on stderr or stdout.
  • set_ipv6 -- If set to true also set IPv6 address (though I don't know why would anyone need to use dynamic DNS with IPv6). Default value is false.

Since configuration file contains sensitive information (authorization token) it has to have 0600 (aka -rw-------) permissions.

Usage

To update your IP every 15 minutes install in you cron something like this:

*/15 * * * *    /path/to/yandex-ddns -config /path/to/yandex-ddns.toml

Licensing

All source code included in this distribution is covered by the MIT License found in the LICENSE file.

Releases

No releases published

Packages

No packages published