[BlueOnyx:25278] Re: Dynamic DNS Client running on Blueonyx

Michael Stauber mstauber at blueonyx.it
Sat Jan 1 03:01:25 -05 2022


Hi Chad,

> I've been using another Linux system in my environment that has been
> responsible for Dynamic DNS updates to Dynu.net.  I installed the
> 'ddclient' package to accomplish this.
> 
> I'm wondering if there's an equivalent or "most supported" way to add
> 'ddclient' to be run on BlueOnyx itself?  I could certainly keep the
> Linux server running for no reason other than updating Dynamic DNS, but
> if I can consolidate to be part of the BlueOnyx machine itself, so much
> the better, as I have managed to migrate some of the services that I'd
> been using that server for to actually run a vsites on BlueOnyx now.

BlueOnyx has a built in DNS-Server, that (since recently on 5209R and
5210R) can do Dynamic DNS:

https://www.mail-archive.com/blueonyx@mail.blueonyx.it/msg17688.html

If enabled you can call a GUI URL via a cronjob to update the IPs of
selected Vsites to the IP of the calling URL.

But I guess that's not what you want or need.

It seems like you're using Dynu.net and they only seem to have their
client available for Debian and MacOS? That's a curious choice. /shrug

But: It also seems like they provide an URL that can simply be called
via "wget" or "curl" and does the same job as the client:

https://www.dynu.com/DynamicDNS/IPUpdateClient/cURL
https://www.dynu.com/DynamicDNS/IPUpdateClient/Wget

In which case you could create a simple cronjon on the BlueOnyx that
will do the trick for you.

As "root" and from SSH run this command:

pico /etc/cron.d/ddns

That creates the textfile /etc/cron.d/ddns and opens it in the "pico"
texteditor. Put this text into it:

*/3 * * * * root wget -4
"https://api.dynu.com/nic/update?hostname=example.dynu.com&myip=10.0.0.0&myipv6=no
&username=someusername&password=somepassword"

You have to fill in the right username and password instead of
"someusername" and "somepassword" and also the hostname
"example.dynu.com" needs to be changed to whatever record you want to
update.

Then hit "CTRL+X" to exit. It will ask you if you want to save. Press
"Y" for Yes and confirm the file name by hitting enter.

The way this seems to work is: If you tell them to use the IP 10.0.0.0,
they will use the IP address of the originating call and use that to set
the IPv4 IP.

The above cronjob will run every 3 minutes, as the leading '*/3'
indicates. If you want to run it every 5 minutes instead, change the
'*/3' to '*/5' instead.

You also might want to restart crond to be sure that this will run:

systemctl restart crond

That should do the trick if I understand their documentation right.

If you need multiple DNS records updated with them, you can either add
more lines of the same to this cronjob, or (better) put all these
individual wget calls into a shell script and call that shellscript with
the cronjonb.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list