PFSense Dynamic DNS with Cloudflare

Configuring Dynamic DNS on PFSense for Cloudflare

 

 

Configure DNS Record on Cloudflare

Before you configure your firewall you will need to have an A record setup on Cloudflare.  You can use a temporary address like 1.1.1.1 in the data field.   If you don't have an A record configured with the name/domain already you will get an error in PFSense.

 

Configure PFSense Firewall 

On the firewall add a new Dynamic DNS entry.

  • Service Type: Cloudflare
  • Hostname: name of host and domain suffix
  • Verbose logging: Checked
  • Username: Cloudflare login/email
  • Password: Cloudflare Global API Key

 

 

Results

If successful you should see the green check for status and your cached IP.

 

 

Troubleshooting

/services_dyndns_edit.php: phpDynDNS (hostname): (Error) Zone or Host ID was not found, check the hostname. 

There is no A record matching the hostname you entered.   The A record must exist ahead of time.

/services_dyndns_edit.php: phpDynDNS (hostname): UNKNOWN ERROR - Invalid request headers
/services_dyndns_edit.php: phpDynDNS (hostname): UNKNOWN ERROR - Authentication error

You entered invalid credentials.   You need to enter a valid username and Global API key for your password.   Although the instructions say you can use an API token, this does not work.