Truenas 13 DynamicDNS

Hello guys, this is my first post here :smile:

So I’m encountering a problem with the DynamicDNS setup of my Truenas server.
As Truenas doesn’t have Cloudflare in the ‘Provider’ list I think I should use ‘Custom Provider’ but than I don’t know what to put in those other textfields…
My initial thoughts are shown in the picture I uploaded to this post but I think those aren’t correct…
(created an API-Token with ‘All zones - Zone Settings:Read, Zone:Read, DNS:Edit’)

On CF’s side, you’ll need an API token with these permissions to set up DDNS:

Permissions:
zone:zone:read
zone:dns:edit

Zone resources (to restrict token access to the specific domain - best practice for security):
include:specific zone:example.com

Beyond that, you might need to create a custom script for use with cURL if the server software will accommodate it.

1 Like

I don’t know if I really should create a cron job to execute that custom script if there is a service for DynamicDNS baked into Truenas… But thank you for that suggestion :slight_smile:

Sure, of course not if it’s baked in, but by the looks of it, your interface isn’t going to accommodate CF’s API. It’s the case with my router too; a custom DDNS provider requires a script in the JFFS partition. :slightly_smiling_face:

More specifically, to make an CF API DDNS update call, you’ll need a zone ID (in the dashboard under domain in question, a dns_records ID (you’ll have to look in the audit log for it), and your API token. The call looks like this:

curl -X PATCH "https://api.cloudflare.com/client/v4/zones/YOUR-ZONE-ID/dns_records/YOUR-DNS_RECORDS-ID" -H "Content-Type: application/json" -H "Authorization: Bearer YOUR-CF-API-TOKEN" -d "{\"type\":\"A\",\"name\":\"subdomain.example.com\",\"content\":\"YOUR-NEW-IP-ADDRESS\"}"

I’m no expert with this stuff, and someone else might prove me wrong, but I don’t see any other way to handle it other than a custom script. HTH :slightly_smiling_face:

1 Like

That all seems a bit complicated as I have a DS Lite connection and therefore I have no dynamic IPv4 and can’t figure out how I get my available IPv6 in cURL… Even manually typing it in won’t work… I have no idea, I might change to my domain provider’s Nameservers and try it without Cloudflare…

I’m not clear on what you meant, but If your IP4 address isn’t dynamic, i.e. is fixed, why do you need DDNS? Or did you mean you only have an IPv6 address?

You can look them both up here:

I only have IPv6 but that is not reachable because of my internet providers DS Lite Tunnel…
But I’m not sure about it not being reachable, so there might be a solution but I can’t figure it out :upside_down_face:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.