OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: juantxorena on May 09, 2023, 07:12:15 PM

Title: ddclient with opnsense backend and cloudflare - more problems
Post by: juantxorena on May 09, 2023, 07:12:15 PM
I opened a post (https://forum.opnsense.org/index.php?topic=33781.0) a couple of days ago about ddclient not starting nor logging. Apparently, my configs weren't correct and it failed silently, so I lost a couple of days on that instead of it saying there were some problem.

Anyway, it starts now, and I've found the following problems, just checking if anybody has a solution and this "new and improved" version of a working plugin that caused no problems to anybody can get to a working state, or even feature parity:

- With the opnsense backend, there's no way of using an API token. The global token has to be used, otherwise it complains about:

error receiving ZoneID [[{"code": 6003, "message": "Invalid request headers", "error_chain": [{"code": 6103, "message": "Invalid format for X-Auth-Key header"}]}]]


Using global token instead of an API one is a serious security issue.

- When using more than one hostname in a config, it gives the error:
failed to set new ip XXXX [{"result":null,"success":false,"errors":[{"code":9000,"message":"DNS name is invalid."}],"messages":[]}]

- More importantly: I have some proxied domains and some unproxied. Updating them via opnsense backend set all of them as unproxied. There is an optional parameter in the body of the query (see here (https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record)), but there's no way of setting it. I guess a frontend change should be made, and have a checkbox to control this.
Title: Re: ddclient with opnsense backend and cloudflare - more problems
Post by: franco on May 10, 2023, 08:48:28 AM
Reported/fixed via https://github.com/opnsense/plugins/issues/3426