Dyn stops its free service.
I've chosen Spdns as an alternative. A service of Secure Point GmbH .
One may invest up to 5 hosts there and can choose between several top-levels-domains.
Registration is simple and straightforward and requires only a username/password and an email-address for submission.
You can reach the service at spdns.de .
The only problem was that my router has no way to deal with this service.
So I have written a small, fast update client in C that easily can be compiled and installed on the BeagleBone Black, Banana Pi or Raspberry Pi.
The update client does not run as a daemon, but is controlled by a CRON job.
And if you landed on this page, it means that it is still running and works ;-)
Each time the update client checks the current IP by calling a Web page that returns the IP address of the calling client, and only then performs an update if the IP has changed since the last call.
You can choose freely, on which side its own IP is checked. Tested are the sides of DynDNS http://checkip.dyn.com/ and the side of spdns.de http://checkip.spdns.de/.
Since the IP address is searched with a regular expression, it should also work for other sides.
The client now supports Basic Authentication for updating the IP, so it should also work with other services such as No-IP. This is not tested yet this since I have no account there.
If someone gives it a try a feedback would be nice if it worked .
I am not liable for errors contained herein or for any damages arising in connection with the use of the software.
Update 28.12.2014: Thanks to the support of Leitwolf this version has become much more user-friendly: you no longer have to fiddle around in the source code, but can (almost) make all the settings in the config file. For here again a big thanks!!
Update 05.12.2017: Thankfully, people have found who continue to develop and keep the update client up-to-date. I recommend that you download the sources from these sources.
- Steven Seifried has updated the used URL's and has published his version on GitHub: https://github.com/canoxnet/spdyn-updater
Installation for SPDNS in short!
- Download the Binary: Download Binary-Paket
- Umpack the compressed file with
tar -zxvf spdnsUpdater_bin.tar.gz
- Move the file "spdnsu.conf" to the folder "/etc/" with
mv spdnsu.conf /etc/
- Create a folder in your home-directory
mkdir /home/YourUserName/updater
- Move the binary "spdnsu" to the folder with
mv spdnsu /home/YourUserName/updater/
- Make the file "spdnsu" executable with
chmod u+x /home/YourUserName/updater/spdnsu
- Set the right permissions for the folder with
chown -R YourUserName:YourUserName /home/YourUserName/updater/
- Adjust the file "/etc/spdnsu.conf":
You can register up to 5 HOSTs. If Update-Tokens are used ( see this artikel ) set parameter "isToken = 1". For authentication with username and password set "isToken = 0".# path of log file. File must be writeable. logfile = /home/YourUserName/updater/spdnsu.log [HOST] host = host1.spdns.de user = username pwd = password isToken = 1 [HOST] host = host2.spdns.de user = username pwd = password isToken = 1 . . .
- Become user YourUserName with
su - YourUserName
- Setting up the cron job::
EDITOR=nano crontab -e
Add here the following line
*/10 * * * * /home/YourUserName/updater/spdnsu
- For testing start the programe manually once with
./home/YourUserName/updater/spdnsu
If everything goes right, 2 new files should have been created: The log-file ( /home/YourUserName/updater/spdnsu.log ) and the IP-file ( /tmp/spdnsuIP.cnf ). In the log file should be an entry, that the IP has been updated successfully and in the IP file should now be the current IP.
Log-Datei:
Log: IP from host host1.spdns.de updated to 111.222.333.444 Time: Mon Apr 28 21:55:37 2014 Log: IP from host host2.spdns.de updated to 111.222.333.444 Time: Mon Apr 28 21:55:37 2014
IP-Datei:
currentIP=111.222.333.444
And done!!
If you want to change a little more, adjust or compile it yourself: here are the
Detailed Instructions
Download
The update client can be downloaded as source code or as a binary.
Source-Paket: Download Source-Paket
Binary-Paket: Download Binary-Paket
Installation
Each package consist of 2 files. spdnsUpdater.c and spdnsu.conf in the source package and spdnsu.conf and spdnsu in the the binary package.
- unpack
- Customize source code - only for the source package (optional)
- Compile - only for the source package (optional)
- Configuration
First, the archive must be unpacked. For this purpose, enter
tar-zxvf spdnsUpdater_src.tar.gz
for the source package or
tar-zxvf spdnsUpdater_bin.tar.gz
for the binary package.
In this version is no longer necessary, because everything can be set in the config file. Only when you want to use your own host to check your IP, it must be entered in the list and the variable NUMBER_IP_HOSTS needs to be adjusted.
So the Code line
char * ipHost[NUMBER_IP_HOSTS] = { "checkip.spdns.de", "checkip.dyn.com", "checkip.dyn.org" };
is changed to
char * ipHost[NUMBER_IP_HOSTS] = { "my.updatehost.com", "checkip.spdns.de", "checkip.dyn.com", "checkip.dyn.org" };
The source file is compiled by using the command
gcc spdnsUpdater.c -o spdnsu
.
The option "-o spdnsu" specifies the name of the compiled program. This is optional.
Now copy the compiled file to the desired location and make it executable with the command
chmod u+x spdnsu
.
The following default values are now set for the program:
- The config file: /etc/spdnsu.conf If you want to use a different path, the path to the config file can be passed to the the program as a command line parameter (spdnsu --configfile=/path/to/spdnsu.conf)
- The log file: /home/pi/spdnsu.log If you want to use a different path, the path can be changed in the config file
- The IP file: /tmp/spdnsuIP.cnf This file contains the current IP address. If you want to take a different path, the path can be changed in the config file
- Update Host: update.spdnsu.de This is the update-host of the provider where the new IP address should be stored. By default it is set to SPDNS.de with the Update Host "update.spdns.de"
So adjust the config-file to your needs and store it to a suitable place ( default is /etc/spdnsu.conf )
# path of log file. File must be writeable. # logfile = /home/pi/spdnsu.log # the name of the file, where the current IP is stored. File must be writeable. # ipFile = /tmp/spdnsuIP.cnf [HOST] # URL for the Host to be updated, e.g. update.spdns.de (SPDNS) or dynupdate.no-ip.com (No-IP). # updateHost = update.spdns.de host = host1.spdns.de user = user1 pwd = password1 isToken = 1 [HOST] # URL for the Host to be updated, e.g. update.spdns.de (SPDNS) or dynupdate.no-ip.com (No-IP) updateHost = dynupdate.no-ip.com host = host2.no-ip.com user = user2 pwd = password2 isToken = 0 . . .
The entry "host" is the complete name of your registered host whose IP needs to be kept up to date, something like "example.spdns.org". In addition, the Username (user) and password (pwd) to the host.
New:
SPDNS offers the possibility not to transfer user name and password for authenticating when updating a host, but only the host name and an update token. This token is generated individually for each host in the Administration area on the side of SPDNS.de and is valid only for this host.
If Update-Tokens are used, enter the Token in the password-field and set the value isToken to 1.
For Informations to Update-Tokens see Article Update-Tokens from Securepoint.
That's all. With the command
./spdnsu [--configfile=/path/to/spdnsu.conf]
start and test the program. If everything goes right, 2 new files should have been created: The log-file and the IP-file. In the log file should be an entry, that the IP has been updated successfully and in the IP file should now be the current IP.
Log-File:
Log: IP from host host1.spdns.de updated to 111.222.333.444 Time: Mon Apr 28 21:55:37 2014 Log: IP from host host2.spdns.de updated to 111.222.333.444 Time: Mon Apr 28 21:55:37 2014
IP-File:
currentIP=111.222.333.444
For safety, you should also check your account, if the update has actually worked.
Set up the CRON job
If everything worked, now the corresponding CRON job needs to be set up, so that the IP-Check and the Update are done periodically.
For this use the command
crontab -e
to open the table with the cron jobs (crontab) in the default text editor.
If the programm is to be started every 10 minutes, add the line
*/10 * * * * /home/pi/spdnsu [--configfile=/path/to/spdnsu.conf]
The path "/home/pi/spdnsu" needs to be adapted to your system. And if the path to the config file is not /etc/spdnsu.conf, it must be set.
A more detailed description of cron can be found here
Now save the file and you're ready!
For questions or problems just leave a comment .
Add comment