/dyndns-transip

Dyndns script that dynamically sets ip address in DNS records of a domain with internet provider transip

Primary LanguageGo

dyndns-transip

Go Report Card

Dyndns script that dynamically sets ip address in DNS records of a domain with internet provider Transip.

This script is meant to let a server detect its own ip address on the internet using ipify.org and set that ip address in a transip DNS Entry using the transip API

Steps:

  1. Activate API in the Transip Portal, store the private key in your .ssh folder
  2. Clone this project on your server
  3. Copy the config.yaml.example to config.yaml and change the values to reflect your wishes
domain: "bla.nl"
server: "hercules"
privatekeypath: "full path including filename to private key"
accountname: "name of transip account"
timetolive: 300
logfile: "./dyndns-transip.log"
  1. Make sure golang is installed on your machine, setup GOPATH and GOBIN variables
  2. Do the following commands:
cd dyndns-transip
go get
go build

the result of this will be a binary dyndns-transip that you can call from a cronjob. Running this binary will update the ipaddress or TTL automatically when they differ from the desired situation. It will preserve the other fields in the DNS Entry and just add the server A record if it does not exist or update the values if the server A record is there.