#12500: Add cloudflare.com to DDNS Scripts
--------------------------+----------------------------------
Reporter: easisee@… | Owner: developers
Type: enhancement | Status: new
Priority: normal | Milestone: Chaos Calmer (trunk)
Component: packages | Version: Trunk
Resolution: | Keywords:
--------------------------+----------------------------------
Comment (by sanshinron):
Hi Christian,
In my url,
{{{
https://www.cloudflare.com/api_json.html?a=rec_edit&email=[USERNAME]&tkn=[PASSWORD]&type=A&z=[DOMAIN]&name=[SUBDOMAIN]&service_mode=0&ttl=1&id=[ID]&content=[IP]
}}}
all parameters that are in [] are changing (they are unique to your domain
and account). That's why I've added them to /etc/config/ddns.
These changing parameters are:
email=[USERNAME] - cloudflare e-mail;
tkn=[PASSWORD] - cloudflare api key, you can get it from cloudflare.com
/my-account/;
z=[DOMAIN] - domain to change, e.g. example.com;
name=[SUBDOMAIN] - subdomain to change, e.g. if you want to change
home.example.com, put only 'home' in here;
id=[ID] - this is the record id from cloudflare. You can get it using api
call from my previous post;
content=[IP] - updated ip.
All other parameters are not changing and can be hardcoded. These are:
a=rec_edit - type of operation - edit dns record,
service_mode=0 - it's supposed to be for SRV records only, but I had to
put it in the call to get it to work;
ttl=1 - ttl of a record, 1 = automatic.
For more information you can check https://www.cloudflare.com/docs/client-
api.html
Updating DNS records is in section 5.2
Paul
--
Ticket URL: <https://dev.openwrt.org/ticket/12500#comment:12>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets