Bosse_B
Posts: 981
Joined: Thu Jan 30, 2014 9:53 am

ddclient configuration for quick response?

Thu Mar 07, 2019 11:34 am

I have an RPi3 sitting as a temperature and humidity logger in my summer home.
It is connected to the Internet via a mobile broadband router.
The site is 100 km away and in wintertime I don't often go there.

I have installed ddclient on the RPi in order to set the ip address of the dynamic host I use to access the site.
The router forwards SSH calls to the RPi and so I can access it to do maintenance etc using PuTTY from home.

Recently the router has started to reconnect to the mobile network frequently and every time it gets a different address and I lose connectivity until it has updated dynamic DNS. So now I think I have to shorten the ddclient checking interval to make it update the DNS record more frequently.

Questions have arisen:

1) Does ddclient first check its external IP address and compare against the DNS reported address before sending an update?

2) Can I set the update interval as low as 60 seconds or less without getting problems with the dynamic dns provider?

3) If I change the conf file, how do I activate the new settings?

My current conf looks like this:

Code: Select all

# Configuration file for ddclient
# /etc/ddclient.conf
daemon=300
ssl=yes
custom=yes
protocol=dyndns2
use=web, web=dns.loopia.se/checkip/checkip.php, web-skip='Current IP Address:'
server=dns.loopia.se/XDynDNSServer/XDynDNS.php

login=xxxxxxxx.com
password='*********'

wildcard=yes
yyy.xxxxxxxx.com
In order to have any idea when this happens I have modified the php reporting script the RPi calls every time it makes a measurement su that it will now also log the IP address of the caller. This way I have found out that sometimes it takes a very long time for the DNS setting to actually update so I can access the site.
In these cases I can use the logged IP address on my server to connect, but it would be much better if the RPi could update the address whenever it changes through the ddclient. The temp measurements are done once per hour so in between the IP address may have changed..

NOTE:
While I was writing this post I connected to the remote RPi in order to copy the conf file content and show it above.
When I was done and wanted to exit nano, the IP address had changed again and I lost connection...
Bo Berglund
Sweden

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: ddclient configuration for quick response?

Thu Mar 07, 2019 11:49 am

Bosse_B wrote:
Thu Mar 07, 2019 11:34 am
I have an RPi3 sitting as a temperature and humidity logger in my summer home.
It is connected to the Internet via a mobile broadband router.
The site is 100 km away and in wintertime I don't often go there.

I have installed ddclient on the RPi in order to set the ip address of the dynamic host I use to access the site.
The router forwards SSH calls to the RPi and so I can access it to do maintenance etc using PuTTY from home.

Recently the router has started to reconnect to the mobile network frequently and every time it gets a different address and I lose connectivity until it has updated dynamic DNS. So now I think I have to shorten the ddclient checking interval to make it update the DNS record more frequently.

Questions have arisen:

1) Does ddclient first check its external IP address and compare against the DNS reported address before sending an update?

2) Can I set the update interval as low as 60 seconds or less without getting problems with the dynamic dns provider?

3) If I change the conf file, how do I activate the new settings?

My current conf looks like this:

Code: Select all

# Configuration file for ddclient
# /etc/ddclient.conf
daemon=300
ssl=yes
custom=yes
protocol=dyndns2
use=web, web=dns.loopia.se/checkip/checkip.php, web-skip='Current IP Address:'
server=dns.loopia.se/XDynDNSServer/XDynDNS.php

login=xxxxxxxx.com
password='*********'

wildcard=yes
yyy.xxxxxxxx.com
In order to have any idea when this happens I have modified the php reporting script the RPi calls every time it makes a measurement su that it will now also log the IP address of the caller. This way I have found out that sometimes it takes a very long time for the DNS setting to actually update so I can access the site.
In these cases I can use the logged IP address on my server to connect, but it would be much better if the RPi could update the address whenever it changes through the ddclient. The temp measurements are done once per hour so in between the IP address may have changed..

NOTE:
While I was writing this post I connected to the remote RPi in order to copy the conf file content and show it above.
When I was done and wanted to exit nano, the IP address had changed again and I lost connection...

Could you use RealVNC Connect, it uses the "Cloud" as a man in the middle so no messing with IP Addressing ??

https://www.raspberrypi.org/documentati ... /README.md
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

Bosse_B
Posts: 981
Joined: Thu Jan 30, 2014 9:53 am

Re: ddclient configuration for quick response?

Thu Mar 07, 2019 12:28 pm

Not really, the RPi is headless and only has a command line interface.
I use it via PuTTY and for that I need to know the IP address of the router.

So I am really mostly interested in the ddclient operations.
Bo Berglund
Sweden

Return to “Raspberry Pi OS”