ddclient: force update

There’s a long standing discussion on how to force update using ddclient, because DynDNS services tipically deactivate your host if it doesn’t send an update for a certain period. And nowadays xDSL are much more stable than they used to be, so you may retain the same IP address for more than one month.

This is usually a problem, so from time to time you either have to confirm the host or update it with a fake address in order to keep it active.

Since ddclient devs still have to implement such an option I found a workaround: update weekly with a fake IP address. Clever, ain’t it? But how to accopmplish it?

Copy the config file to ddclient_FORCE.conf and make it update with a fake address.


cp /etc/ddclient{,_FORCE}.conf

then open /etc/ddclient_FORCE.conf and add or change the use parameter this way:


use=ip, ip=1.2.3.4

this will tell ddclient to update your host to 1.2.3.4. We’re almost done.

Let’s schedule the update in a timespan that will not affect your usage, like for offices can be on Saturday night. Add to your preferred cron file (like /etc/crontab) a line like this:


2 3 * * sun root ddclient -file /etc/ddclient_FORCE.conf -debug > /var/log/ddclient_force.log 2>&1

And you’re done!

 

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Solve : *
17 − 5 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.