Gather IP address of a computer and push it to an Snap DynDNS Server instance.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxmehl baffcea7b8 fix formatting 3 jaren geleden
.gitignore fix gitignore file 3 jaren geleden
LICENSE initial commit 3 jaren geleden
README.md fix formatting 3 jaren geleden
config.cfg.sample initial commit 3 jaren geleden
dnsupdate.sh initial commit 3 jaren geleden

README.md

Snap DynDNS Client

Snap DynDNS Client is the perfect counterpart to Snap DynDNS Server. This software can be easily used by any person having an account on such a server instance. This script looks up the current public IP address, sends it to the server part (together with the DynDNS domain name, personal username, and password), which in the end does all the updating process of the domain itself.

Additional Features

The application can also be instructed to ignore certain IP addresses. For those there will be no update sent to the server part. This may make sense if you use a VPN server or tunnel every traffic through Tor. For the latter, it downloads the official list of Tor exit nodes every 7 days and compares your actual public IP with these addresses.

You can use any service returning your IP address in a plain form (so no HTML headers or other website content). There is one service set by default. Of course, you can also use IPv6 addresses. It just has to correlate with the DynDNS domain’s record. Please read more in the server documentation about this.

Requirements

This Bash script requires curl and wget to be installed. It has been tested on a Debian Sid (April 2016) and doesn’t use fancy parameters for both applications.

Installation

Clone the git repository to any directory of your computer. Rename the file config.cfg.sample to config.cfg. Open it in an editor and modify the settings as described in the file.

For the settings user, and password, please use the data you have created in the server’s users.db file. The server variable is the Snap DynDNS Server URL, appended by update.php.

Debugging

By default, the application creates both a file with the latest known IP address (to detect whether it should send an update to the server at all) called old.ip. It also creates a small log file (update.log) for each run, containing a timestamp and some information about what the script has done (updated successfully, or aborted because ignored IPs or unchanged IP).