Skip to content

cfauth.ini

rnjmur edited this page Jan 12, 2024 · 6 revisions

The cfauth.ini file contains the config used to access the CloudFlare API.
Any configuration files (ex. cfauth.ini) permissions should be set to 'chmod 600' or 'chmod 640' to prevent unauthorized users from viewing the file and possibly acquiring your Cloudflare API Token.

The [global] section has the time_wait setting in seconds. This is used for the wait time between queries when running as a service or daemon.

The [mail] section is used for sending emails when the IP has been updated. This currently does not work.
The enable setting should be either N or Y and will enable sending emails or not.

The [whatismyip] section is for anyone using whatismyip.com for doing IP checks. It has only one setting that has an API Key for whatismyip.com. An API Key for whatismyip is not required for the tool to work, however whatismyip my rate limit requests after a certain number of requests are made within a certain period of time.

The zone sections [zone_1], [zone_2], ... [zone_10] stores the configuration settings for the zones you want to update.
The settings needed are:
zone_id - The Cloudflare zone's ID number
record_id - The zone's A record ID number
bearer_token - bearer_token is your API_Token which must be created from your CloudFlare Account. Your API token bust have edit permissions for the zone you want to udpate. Instructions on acquiring a Cloudflare token for your account can be found on the Instructions page.
<New in V1.0> - a "custom_id" setting can be specified to modify the IPs contained in any DNS records that are not A records.

You should only have a [zone_X] section if it is being used. You can a maximum of 10 zones specified and the zone sections must be named [zone_X] where X = 1 through 10

You can run the query switch (-q) to get the needed zone and record ids.

Clone this wiki locally