Can new DDNS plugin handle custom URLs ?

Started by muchacha_grande, July 24, 2023, 12:26:49 AM

Previous topic - Next topic
Hi, as I read that old DDNS plugin will not exists anymore, I'm preparing to upgrade to the new one beforehand.
I'm using many custom URLs to update cPanel dynamic records.
Does the new plugin support custom URLs ?

I recently got os-ddclient running against Cloudflare using an API token.

Not sure about your request about custom URL's though, but there is an option in the client called 'custom' for the Dynamic DNS provider?

What do you mean by custom URL's exactly?
Maybe a couple of examples to help others help you.

There is also an option to add multiple hostnames. This only 'appears' to work for me if I choose to use the ddclient backend it seems. This is an option in the client. But with this I don't see any update information in the GUI, it only shows success in the logs. To get around this I choose the OPNsense backend and split my TLD's into separate configurations. Pretty easy because you can clone them.

Hi bunchofreeds, thank you for your answer.

By custom URLs I refer to the URL that cPanel requires to update a certain DNS "A" record.
When I create a dynamic DNS record under cPanel, it provides a URL to update it.

This is an example:
https://router.mysite.com:2083/cpanelwebcall/qcrbkttwhpfefyairvzshjeorzpuqqzm
No password needed.
If the call succeeds you obtain a response like "ipv4: %IP%"

My question is that if the new plugin supports calling a manual entered URL like the one above.
The original plugin allows to select 'custom' in the provider combo and allows to enter an arbitrary URL. Also, it allows to enter a response string with the IP variable %IP%, so the plugin can evaluate if the call succeeded or not.

Thank you again and cheers

Feature will be added in a bit, PR exists https://github.com/opnsense/plugins/pull/3511 but Ad already said he would look into it in order to find a simple solution for the custom bit.


Cheers,
Franco


Quote from: franco on July 27, 2023, 10:13:08 AM
Feature will be added in a bit, PR exists https://github.com/opnsense/plugins/pull/3511 but Ad already said he would look into it in order to find a simple solution for the custom bit.


Cheers,
Franco

Happy to see you are basing an implementation on my PR! It's a feature I really need myself before utilizing the new ddns plugin so very happy to see movement on it.

August 15, 2023, 04:44:29 PM #6 Last Edit: August 16, 2023, 01:47:50 PM by henniee
I think I'm too stupid for the new "post" implementation:

2023-08-15T16:39:32 Notice ddclient FAILED: updating  xy.me2ip.com: Could not connect to https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?q=0293840928348asjhhjasdjnbkaSJKASD().
2023-08-15T16:39:32 Notice ddclient WARNING: cannot connect to https:443 socket: hostname verification failed hostname verification failed
2023-08-15T16:39:31 Notice ddclient CONNECT: https:
2023-08-15T16:39:31 Notice ddclient UPDATE: updating xy.me2ip.com
2023-08-15T16:39:31 Notice ddclient INFO: setting IPv4 address to 93.222.141.22 forxy.me2ip.com
2023-08-15T16:39:31 Notice ddclient WARNING: 'if-skip' is deprecated and does nothing for IPv4
2023-08-15T16:39:31 Notice ddclient WARNING: file /usr/local/etc/ddclient.conf, line 12: Invalid Value for keyword 'protocol' = 'post'


can anybody help me pls?

WARNING: cannot connect to https:443 socket: hostname verification failed hostname verification failed
???
Invalid Value for keyword 'protocol' = 'post'
???

I'm getting the same error: "Invalid Value for keyword 'protocol' = 'post'"

:-\

Remember the good old ddns...

Somehow this is funny because ddclient is not supposed to even this... because the OPNsense backend is used...

2023-08-15T16:39:31   Notice   ddclient   WARNING: file /usr/local/etc/ddclient.conf, line 12: Invalid Value for keyword 'protocol' = 'post'


Cheers,
Franco

August 16, 2023, 04:50:33 PM #9 Last Edit: August 16, 2023, 04:58:25 PM by henniee
lol - set the Backend to OPNsense in General Settings (default is ddclinet) - will try it again ;) thy!

August 16, 2023, 05:20:56 PM #10 Last Edit: August 16, 2023, 05:34:23 PM by henniee
not it shows:
[400 - {"message":"Invalid API key format."}]

if i do the post manually:
curl +X https://ipv4.api.hosting.ionos.com/dns/v1/dyndns?q=MJHGAFJAHsd67tf<xchgfGHFHJGYXCvbyxzg76sadhgfvgxc7yx6c75gyhxcg

(code is example!)
it works...

FAQ from 1u/1/ Ionos:
https://www.ionos.de/hilfe/domains/ip-adresse-konfigurieren/dynamisches-dns-ddns-einrichten-bei-company-name/?utm_source=search&utm_medium=standalone&utm_term=api&utm_campaign=all

August 16, 2023, 10:18:41 PM #11 Last Edit: August 16, 2023, 10:21:54 PM by thowe
I should also be able to make a GET-request to a custom URL with the new DynDNS plugin to be able to set the NIC addresses of the WAN interfaces at OpenDNS:
https://updates.opendns.com/nic/update?hostname=WAN1-Provider1

and

https://updates.opendns.com/nic/update?hostname=WAN2-Provider2

In the old DynDNS plugin this was easy. As soon as this works with the new DynDNS plugin, I can update the OPNsense. Before that it does not work. Unless I make a cron job that sends the GET request... But I would prefer the DynDNS plugin, because it is more explicit and better integrated in config backups, etc.

Edit:
Wait: I just realized that this Merge request is about a custom POST-request. So does this mean, that a custom GET-request is already configurable?
System 1: PC Engines APU2C4
System 2: PC Engines APU2E4
System 3: Proxmox-VM on Intel NUC