nephilim75 / DynDNSS_update

Script is posting current IP addresses of server/ client to DynDNSService.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DynDNSS_update

Script is posting current IP addresses of a server or client to DynDNSService.

Purpose

This setup is intendent to be used with (private) hardware behind an ISP account with changing IP addresses. This helps to make the server or client available from internet. DynDNS Service (DDNSS) provides constant domain name even though your IP addresses are changing.

The simple but robust shell scripts are logging all events with meaningful and understandable comments and are doing checks against the DDNSS server to ensure the update success.

Our scripts support IPv4 only, IPv6 only and both IPv4&IPv6 (DualStack).

Requirements

  1. An account at DynDNS Service.
  2. Created host and its host name.
  3. Valid update key. You'll find it on DDNSS's dashboard on the left bottom corner.
  4. wget and curl installed.

HowTo

1. Copy the script to a directory of your choice. Example: /usr/local/bin/ddnss.

2. Give the script you've choosen the name ddnss.sh and paste the copied content into it.

$ (sudo) nano /path/to/ddnss/ddnss.sh

Example:

$ (sudo) nano /usr/local/bin/ddnss/ddnss.sh

3. Make ddnss.sh executable for root.

$ (sudo) chown root:root /path/to/ddnss/ddnss.sh
$ (sudo) chmod 700 /path/to/ddnss/ddnss.sh

Example:

$ (sudo) chown root:root /usr/local/bin/ddnss/ddnss.sh
$ (sudo) chmod 700 /usr/local/bin/ddnss/ddnss.sh

4. Update the scripts according to your needs.

# Define variables DDNSS (user input)
KEY="UpdateKey provided by DDNSS"
HOST="host.name.tld"
WDIR="/path/to/ddnss"

Example:

# Define variables DDNSS (user input)
KEY="ljaeirio3v536ijuagfiu"
HOST="myserver.ddnss.org"
WDIR="/usr/local/bin/ddnss"

5. Add a cron job to root's crontab to trigger the script.

*/10 * * * * /path/to/ddnss.sh > /dev/null 2>&1

Example:

*/10 * * * * /usr/local/bin/ddnss/ddnss.sh > /dev/null 2>&1

That's it.

About

Script is posting current IP addresses of server/ client to DynDNSService.

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%