This script enables one to update a dnsimple as a dynamic DNS provider. It compares the current external IP address, via icanhazip
, to what the dnsimple primary DNS server says, and if they differ, it updates the A record.
The config.yml
file should contain the following information:
variable name | value |
---|---|
token | account token |
account_id | account id |
zone | domain name, e.g. example.com |
hostname | full hostname (fqdn), e.g. host.example.com |
record_id | record id for hostname |
The obvious prerequisites are ruby and bundler. Just run bundle install
.
Run the script update.rb
in a scheduler, e.g. cron, as often as you'd like. I figure 5 minutes is fine.