I see that ClouDNS is now supported by Opnsense Dynamic DNS (ddclient). However, having selected ClouDNS in the 'Service' field drop down list, it is not clear where my ClouDNS apikey needs to be put.
As an experiment I tried using various combinations of the following fields:
Username
Password
resourceid (using advanced mode)
Hostname= mydomain.eu
In each case the log showed an error similar to:
WARNING: skipping host: mydomain.eu: 'dynurl=' is an invalid string.
It seems as if the Opnsense GUI does not allow the ddclient data item 'dynurl' to be set. Is this a bug on the Opnsense GUI?
I should note that similar comments have recently been put on the 22.7 Legacy forum.
Opnsense version=OPNsense 23.1.7_2-amd64
I could not make it work, so I've solved with a cronjob approach.
It is not the optimal solution but until the issue is fixed it will do what I need. I am not sure if it is a viable solution for your case, but here is how I've done it.
Login via ssh, drop to the shell and create 2 files:
/usr/local/opnsense/service/conf/actions.d/actions_cloudns.conf
with contents:
[sync]
command:perl /usr/local/bin/cloudnsupdate
parameters:
type:script
message:Update Cloudns
description:Cloudns Update
and
/usr/local/bin/cloudnsupdate
This last one is the perl script you can download from cloudns (dynamic-url-perl.pl), I've renamed it to cloudnsupdate. Make sure to make it an executable with chmod +x /usr/local/bin/cloudnsupdate
After this you can reload configd:
service configd restart
Now you can exit ssh and will be able to select on the web interface:
System:Settings:Cron
+ (Add )
You should be able to see on Command an option Cloudns Update, as you can see on the attachment.
I asked Cron to run it once a day.
Thanks for the suggestion. Your workaround would work fne but running only once a day means that I might have to wait upto 24 hours before cloudns updates my DNS record.
I currently use the legacy "Dynamic DNS" plugin. When that is finally removed from OpnSense (this summer?), unless the bug is fixed in the meantime, I would implement a workaround which monitors my external WAN ip address and whenever a change is detected would invoke the ClouDNS supplied script. The workaround would involve using Monit service since I already a service which does something very similar. This way I would have a granularity of the order of minutes and I would not overload ClouDNS with requests when the ip address does not change.
I have opened a ticket on Github for the plugin here: https://github.com/opnsense/plugins/issues/3430 (https://github.com/opnsense/plugins/issues/3430)
With CloudFlare API tokens, the username needs to be set to "token" (without quotes) and the password is where the API key goes. I don't know if this will work with ClouDNS.