Skip to content

Automatically updates the TLSA record for Cloudflare when Certificate Hash Changes

Notifications You must be signed in to change notification settings

paulo-roger/Cloudflare-DANE-Auto-Updater

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare-DANE-Auto-Updater

Welcome to the Cloudflare-DANE-Auto-Updater repository, a solution specifically crafted for businesses looking to enhance their email security through DANE while leveraging Cloudflare for DNS management and coping with the limitations of using Google Workspace for business email.

The DANE Challenge with Google Workspace

Implementing DANE for email services, particularly with Google Workspace, involves navigating a complex landscape of DNS and email security configurations. This guide is born out of the need to address a common problem: the inability to directly receive emails on your primary business account due to DANE's stringent security requirements, and how Cloudflare's mail routing feature can provide a viable workaround.

Core Challenges:

  1. DANE Configuration Nuances / Mail Server Constraints: DANE requires DNS adjustments, including TLSA record addition and DNSSEC activation. For email services like Google's, which may not fully support DANE, this poses a unique challenge as you cannot directly influence their server configurations. The lack of DANE support (DNSSEC and TLSA records) on your email server can significantly limit your ability to use DANE, as these configurations are typically managed by the email service provider.

  2. Implications for Email Reception: The primary issue with DANE and Google Workspace is the interruption of direct email delivery to your primary business account. Adjustments in email routing are necessary for DANE compliance but result in the inability to receive emails directly.

  3. Cloudflare Certificate Rotation: For those using Cloudflare's email routing feature, the periodic rotation of TLS/SSL certificates necessitates regular updates to the TLSA record in your DNS, a process not automated by Cloudflare.

Implementation Strategy

To address these challenges and effectively implement DANE with Google Workspace, follow the steps outlined below:

  1. Implement Cloudflare Mail Routing: Set up Cloudflare to forward emails to an alternative email address. This is a critical step, as it addresses the core issue of not being able to directly receive emails at your primary business domain due to DANE's requirements.

  2. Selection of an Alternative Email Address:

    • Purchasing a New Domain: Initially, one might consider buying a secondary domain for email forwarding. However, this might be an unnecessary step for many businesses.
    • Utilizing an Existing Free Gmail Account: A more streamlined approach involves creating a new Gmail account and using it as the destination for forwarded emails. This Gmail account can then retrieve emails using POP, effectively working around the direct email reception issue.
  3. Configure the New Email Account: Set up this alternative email account (whether it's a new address on a secondary domain or a new Gmail account) to receive forwarded emails from your primary business domain.

  4. Gmail POP Configuration: In your primary Gmail account's settings, configure the "Check mail from other accounts" option to fetch emails from the alternative account using POP. This step essentially restores your ability to manage and read incoming business emails from within Gmail, despite the DANE-induced direct reception issue.

  5. Automate TLSA Record Updates: Use the provided script to automate the updating of your domain's TLSA record in Cloudflare in response to certificate changes. This script should be run as a scheduled task (cron job) to ensure your DNS remains in compliance with DANE's requirements without manual intervention.

Concluding Remarks

This guide and the associated automation tool offer a practical solution for businesses facing the challenge of implementing DANE with Google Workspace. By leveraging Cloudflare's mail routing to forward emails to an alternative account and retrieving those emails via POP, businesses can comply with DANE's security protocols without losing the functionality of their primary Gmail account. This workaround highlights a creative approach to overcoming the limitations of current email service providers in supporting DANE directly, ensuring businesses do not have to compromise on security or email functionality.

For full details on the automation script and additional setup instructions, please refer to the further documentation within this repository.

FYI

This script will work assuming you need a 3 1 1 config for your TLS cert (Port 443)

About

Automatically updates the TLSA record for Cloudflare when Certificate Hash Changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.3%
  • PHP 21.7%