DynDNS provider: spdyn.de (previous name: spdns.eu)
os-release: „Raspbian GNU/Linux 9 (stretch)“
Affected ddclient: 3.8.3
Script Version: 184 2015-05-28 19:59:34Z
Today I have lost the connection to my Raspberry Pi.
After checking some parameters I have figured out, that a wrong IP address was associated with my domain name.
But why? I’m using the ddclient script to get my official IP address and in case of change to associate it with my domain…
It seems that the response from checkip.spdyn.de has changed. It looks now as follows:
===
HTTP/1.1 200 OK
Server: openresty/1.13.6.2
Date: Fri, 01 Jun 2018 08:49:23 GMT
Content-Type: application/octet-stream
Content-Length: 14
Connection: close
Content-Type: text/plain
xx.xxx.xxx.xxx
===
The last line of the response contains the external IP address but the address associated with my domain was 1.13.6.2 which is a version number of openresty. Unfortunately this version number looks like a valid IP address for the regular expression used in the ddclient script and therefore it is extracted and used as the new IP address during the domain update.
The following modification of the ddclient script (/usr/sbin/ddclient) should fix the problem (at least it was working for me):
=== line 2149:
if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) {
=== replace by:
if ($reply =~ /^.*\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) {
===
This update disables the minimal matching for the first „.*“ within the regular expression which results with correct IP address match at the end of checkip.spdyn.de response.
Restart the ddclient service with:
# service ddclient restart
Additional information for „Jessie“:
On „Raspbian GNU/Linux 8 (jessie)“ with script version „157 2013-12-26 09:02:05Z“ the line number to correct is 2045.