[SOLVED] Setting up Cloudflare Dynamic DNS without using Global API Key
-
Has anyone got Cloudflare DDNS working without using a global API key that allows complete access to the Cloudflare account. My search seems to indicate that it is possible, but there is not enough detail for me to understand exactly what I need to do to get things working.
I want subdomain.mydomain.com to point to my home IP address for road warrior VPN access. I currently have several subdomains on mydomain.com that are pointing to a number of different IP addresses.
I setup subdomain.mydomain.com with a placeholder entry "1.1.1.1" which is supposed to be replaced when the DDNS is operational.
I was also able to create a user API token with permissions Edit zone / DNS:Edit for the single domain mydomain.com
I'm now stuck. Any guidance would be much appreciated.SOLUTION:
After creating an A Record in Cloudflare for use by the DDNS, create a User API Token by selecting 'My Profile' / API Tokens
and then select "Create Token"Under Zone Resources fill in the domain name to be used (mydomain.com)
Once you have created and saved a copy of the API token, configure the pfSense dynamic DNS client as follows:
- Servoce type = Cloudflare
- Omterface to monitor = WAN
- Hostname = subdomain t be used
- Domain = root domain to be used.
- Username = Blank / No Entry
- Password = API Token just created (paste a copy to both fields)
- TTL = Low value TTL
- Description = Optional Comment
If somehow the token gets stolen, damage is limited to only changing the DNS records for the domain used by the DDNS. If a global key was stolen, the entire account could be hijacked.
Hope this helps... no sense everybody wasting their time figuring it out;.
-
Did you ever figure this out?
I have the same problem.The global token works, but not when trying to use a user token.
-
@kowi he posted how he did right there..
Under the SOLUTION: ;)
-
@guardian said in [SOLVED] Setting up Cloudflare Dynamic DNS without using Global API Key:
Zone Resources fill in the domain name to be used (mydomain.co
Thank you! I just needed to set this up and all the other tutorials say you need a global key!