Bug Report: RUTX50 RutOS 00.07.20.3: Cloudflare DDNS API token fails (PUT missing Authorization header, CF error 9106)

Environment

  • Device: Teltonika RUTX50

  • Firmware: RUTX_R_00.07.20.3 (build date 2026-01-21)

  • DDNS provider: cloudflare.com-v4

  • Auth method: Cloudflare API Token using Authorization: Bearer <token>

  • Domain format: host@domain.tld (e.g. r4@example.ch)

  • lookup_host: r4.example.ch (A record)

Issue

Cloudflare DDNS zone lookup and DNS record lookup succeed (GET requests include the Bearer authorization header), but the record update (PUT) fails.

Cloudflare returns:


{"success":false,"errors":[{"code":9106,"message":"Missing X-Auth-Key, X-Auth-Email or Authorization headers"}]}

Verbose output shows the Authorization header is present on GET calls but missing on the PUT call.

Root cause

In:

  • /usr/lib/ddns/update_cloudflare_com_v4.sh

Inside cloudflare_transfer() the script overwrites the curl argument list when data is provided:


[ -n "$__DATA" ] && set -- "--data" "@$__DATA"

This replaces all previously appended args (including --header Authorization: Bearer ..., --header Content-Type: application/json, --request PUT, --cacert, etc.), so the PUT request is sent without auth headers.

Fix (one-liner)

Change the overwrite to an append:


[ -n "$__DATA" ] && set -- "$@" "--data" "@$__DATA"

Workaround

/usr/lib is on a read-only filesystem, so a workaround is to:

  1. Copy the script to a writable location (e.g. /root/...),

  2. Apply the one-line fix,

  3. Bind-mount the fixed script over the original:

  • mount --bind <fixed_script> /usr/lib/ddns/update_cloudflare_com_v4.sh

After applying the fix, the PUT request includes the Authorization header and the DDNS update succeeds.

Request

Please patch update_cloudflare_com_v4.sh in RutOS / DDNS scripts and include in the next firmware release (hotfix if possible), as this breaks Cloudflare DDNS with API tokens on 00.07.20.3.

Hello,

Thank you for the feedback & the bug report. I’ll go ahead and create a request for our R&D team to check.

Thank you for your patience,
M.

Hello!

Great news, a fix for this has been implemented and is planned to be released with the firmware version 7.21

Regards,
M.