OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: snapilica2003 on December 22, 2022, 08:54:35 am

Title: use ddclient 3.10.0
Post by: snapilica2003 on December 22, 2022, 08:54:35 am
ddclient 3.10.0 added support for serveral new DNS providers, one of which is the one I use (Gandi.net). But it seems that the current version of os-ddclient (1.9_2) still uses ddclient 3.9.1

It appears that os-ddclient-devel has the new version of ddclient, but I can't seem to find a way to update JUST that package.

As there's no ETA of when this will be pushed to stable, can anyone give me some tips on how to get ddclient 3.10.0 on my device?
Title: Re: use ddclient 3.10.0
Post by: franco on December 22, 2022, 09:09:05 am
You can do it manually if you don't have the development version selected:

# pkg install os-ddclient-devel

On the development version this also shows up in the plugins list in the GUI.

FreeBSD ports won't move to 3.10.0 just yet. There are not high hopes for the future of ddclient.


Cheers,
Franco
Title: Re: use ddclient 3.10.0
Post by: snapilica2003 on December 22, 2022, 11:11:56 am
There are not high hopes for the future of ddclient.

I was more than happy with os-dyndns but someone decided that's crap and the future is ddclient. Now it seems this doesn't have a future, so what's left?
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 11:22:08 am
crontab in linux vm (or windows vm/pc) running a script with the respective update commands (depending on the service but explained on every one). At least this works without a problem, which I couldn't say for both plugins in opnsense.
Title: Re: use ddclient 3.10.0
Post by: chemlud on December 22, 2022, 12:10:25 pm
crontab in linux vm (or windows vm/pc) running a script with the respective update commands (depending on the service but explained on every one). At least this works without a problem, which I couldn't say for both plugins in opnsense.

Show your script, please... :-)

As a last resort I will run it on a raspi in every net that needs dyndns. But much more convenient to have it on the router... :-(
Title: Re: use ddclient 3.10.0
Post by: franco on December 22, 2022, 01:39:12 pm
Now it seems this doesn't have a future, so what's left?

Well, simple: neither.


Cheers,
Franco
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 02:20:17 pm

Show your script, please... :-)

As a last resort I will run it on a raspi in every net that needs dyndns. But much more convenient to have it on the router... :-(


for Duckdns e.g.

Code: [Select]
nano duck.shput this inside
Code: [Select]
echo url="https://www.duckdns.org/update?domains=yyyyyyyy&token=xxxxxxxxxxxxx" | curl -k -o ~/duck.log -K -
Code: [Select]
chmod +x duck.sh
Code: [Select]
crontab -eadd this:
Code: [Select]
*/15 * * * * ~/duck.sh >/dev/null 2>81
In the same script I have another line for updating another dyndns (ipv64.net)
so I update both at the same time.

For no-ip:

Code: [Select]
echo url="https://username:pass(encodedbase64)@dynupdate.no-ip.com/nic/update?hostname=xxxxxx.ddns.net" | curl -k -o ~/no-ip.log -K -
Title: Re: use ddclient 3.10.0
Post by: chemlud on December 22, 2022, 03:19:59 pm
Now it seems this doesn't have a future, so what's left?

Well, simple: neither.


Cheers,
Franco

Maybe take some minutes over the holidays and read some of your posts from the first 1-2 years of this project. It's mesmerizing to see the way the project took in such a short time... Happy Holidays!

Title: Re: use ddclient 3.10.0
Post by: chemlud on December 22, 2022, 03:27:01 pm

Show your script, please... :-)

As a last resort I will run it on a raspi in every net that needs dyndns. But much more convenient to have it on the router... :-(


for Duckdns e.g.

Code: [Select]
nano duck.shput this inside
Code: [Select]
echo url="https://www.duckdns.org/update?domains=yyyyyyyy&token=xxxxxxxxxxxxx" | curl -k -o ~/duck.log -K -
Code: [Select]
chmod +x duck.sh
Code: [Select]
crontab -eadd this:
Code: [Select]
*/15 * * * * ~/duck.sh >/dev/null 2>81
In the same script I have another line for updating another dyndns (ipv64.net)
so I update both at the same time.

For no-ip:

Code: [Select]
echo url="https://username:pass(encodedbase64)@dynupdate.no-ip.com/nic/update?hostname=xxxxxx.ddns.net" | curl -k -o ~/no-ip.log -K -

Many thanks! Apparently Duck and no-ip don't need the actual public IP for the update string, iirc this is more complicated (whatismyip.org or something...) for my providers...
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 03:35:46 pm

Many thanks! Apparently Duck and no-ip don't need the actual public IP for the update string, iirc this is more complicated (whatismyip.org or something...) for my providers...

the public IP is not needed they get it from the asking host BUT it can be appended if it is different. Correct syntax available on their sites.
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 03:46:37 pm
P.S. I'm certain this could be done in OPNsense itself by creating this short script and adding it to a cronjob.
Perhaps someone knowledgeable enough can teach us.
I'm not into BSD stuff so won't touch it by myself but have found some leads:


https://forum.opnsense.org/index.php?topic=6177.0
Title: Re: use ddclient 3.10.0
Post by: chemlud on December 22, 2022, 03:59:37 pm
P.S. I'm certain this could be done in OPNsense itself by creating this short script and adding it to a cronjob.
Perhaps someone knowledgeable enough can teach us.
I'm not into BSD stuff so won't touch it by myself but have found some leads:


https://forum.opnsense.org/index.php?topic=6177.0

Fun with running it on the router: trigger dyndns-update with new WAN IP ;-)

...no idea how to have this implemented on a raspi (check WAN address every minute and update if changed). Or maybe I install ddclient or the old dyndns client directly on the raspi. Will have to check what's most appropriate...
Title: Re: use ddclient 3.10.0
Post by: dcol on December 22, 2022, 04:40:05 pm
Not sure where Dynamic DNS is headed, but ddclient has never worked for me. I still remain on the Legacy plugin.
Is trying the development version worth a try, or am I wasting my time?
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 04:45:26 pm
Not sure where Dynamic DNS is headed, but ddclient has never worked for me. I still remain on the Legacy plugin.
Is trying the development version worth a try, or am I wasting my time?

Never worked well, neither of both.

Just the small script on a linux machine/VM/LXC/Raspberry and you'll be done in 2min and never have to worry about it.
Title: Re: use ddclient 3.10.0
Post by: chemlud on December 22, 2022, 08:32:32 pm
Never worked well, neither of both.

Can't confirm this, the old plugin works here reliably for years in different installs.

Your script updates the IP every 15 minutes, so after a change in WAN IP you are offline (tunnels etc.) for 15 min? If updating every minute you get blocked for spamming your dyndns provider...

How to detect a change in WAN IP reliably?
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 08:52:18 pm
Well, depends on dyndns provider I guess. Mine didn't work.

I have 15min because I don't want to hammer the dyndns servers. Could be 5min or whatever...

When the IP changes it will be set. Worst case is 15min with the wrong IP. Can live with that.
Title: Re: use ddclient 3.10.0
Post by: manilx on December 22, 2022, 08:55:07 pm
p.S. Actually my ISP Vodafone didn't change my IP for the last 4 years ;)
Title: Re: use ddclient 3.10.0
Post by: SolarCzar on January 07, 2023, 12:56:08 pm
Getting these following my WAN dropping and reconnecting...

Code: [Select]
2023-01-07T05:49:20-06:00 Notice opnsense /usr/local/opnsense/scripts/routes/gateway_status.php: plugins_run return_gateways_status (execute task : dpinger_status())
2023-01-07T05:49:20-06:00 Notice opnsense /usr/local/opnsense/scripts/routes/gateway_status.php: plugins_run return_gateways_status ()
2023-01-07T05:49:18-06:00 Notice opnsense /usr/local/etc/rc.filter_configure: plugins_run return_gateways_status (execute task : dpinger_status())
2023-01-07T05:49:18-06:00 Notice opnsense /usr/local/etc/rc.filter_configure: plugins_run return_gateways_status ()
2023-01-07T05:49:18-06:00 Critical dhclient exiting.
2023-01-07T05:49:18-06:00 Error dhclient connection closed

Started with 22.7.10, and can't discern what is happening.