From eda6393abaad5fe8281559044d5dfc3bf6ee6eb3 Mon Sep 17 00:00:00 2001 From: Eduard Veit Date: Mon, 11 May 2020 18:27:20 +0200 Subject: [PATCH] Extend readme and add some hints in config Signed-off-by: Eduard Veit --- README.md | 35 ++++++++++++++++++++++++++++++----- nsupdate.d/dist.config.sample | 6 ++++-- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b9b2c0a..db9ca37 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,52 @@ # Nameserver update for INWX (nsupdate) -This shell script implements [dynamic DNS](https://en.wikipedia.org/wiki/Dynamic_DNS) using the [inwx](https://www.inwx.de/) API, i.e., it updates nameserver entries with your current WAN IPv4 and IPv6 addresses. +This shell script implements [dynamic DNS](https://en.wikipedia.org/wiki/Dynamic_DNS) using the [DomRobot XML-RPC API](https://www.inwx.de/de/help/apidoc/f/ch02s13.html#nameserver.updateRecord) by [INWX](https://www.inwx.de/). +This script can update nameserver entries with your current WAN IPv4 and IPv6 addresses. +It uses the `nameserver.updateRecord` method of the API. + +advantage: You don't need payed dynDNS-accounts for multiple domains. +disadvantage: The minimum TTL is 300 (5 minutes). The dynDNS-Service allowes 60 (1 minute). + +There exists the `dyndns.updateRecord` method in the DomRobot API. Therefore you need a DynDNS-account by INWX. If you need this option, feel free to change the script to your needs. ## Requirements -In order to run you need to have _curl_ and _awk_ installed, as well as _drill_ or _nslookup_. +In order to run the script you need to have installed the following command line tools: + +- _curl_ +- _awk_ +- _nslookup_ or _drill_ ## Installation -Simply download the `master.zip` and extract it, e.g., using `wget` and `7z x master.zip`. +Simply clone this project or download the `master.zip` and extract it, e.g., using `wget` and `7z x master.zip`. Place your config files in the `nsupdate.d` folder. A `dist.config.sample` is provided. At least one config file needs to exist, ending with `.config. -All .config files will be processed by looping them. +All .config files (one for each dns-record) will be processed by looping them. Simply copy the provided dist.config.sample and adjust your config to your needs. For home.example.com you may create: home.example.com-ipv4.config and/or home.example.com-ipv6.config + +## Run nsupdate by cron +With `crontab -e` you can add the following line for running the script every 5 minutes: +`*/5 * * * * bash /home/$USER/nsupdate/nsupdate.sh` + ## Changelog +**2020-05-11** + +- Updated Readme with some hints +- Updated config.sample with a hint for TTL + +**2020-03-31** + +- Made time to live configurable + **2019-12-20** -- Fixing API-XML syntax +- Fixed DomRobot XML-RPC API syntax - Added some more documentation **2015-07-22** diff --git a/nsupdate.d/dist.config.sample b/nsupdate.d/dist.config.sample index b22d7d4..cde0fe3 100755 --- a/nsupdate.d/dist.config.sample +++ b/nsupdate.d/dist.config.sample @@ -19,10 +19,12 @@ IPV6="NO" # Update an MX record. MX="NO" -# Suppress all messages. +# Suppress all messages and deactivates logging. SILENT="NO" -# Time to Live +# TTL: Time to Live +# default TTL setting by inwx is 3600 (1 hour) +# minimum TTL allowed by inwx is 300 (5 minutes) for regular nameserver record updates TTL=300 # Login credentials for the inwx admin interface