Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

update_tlsa

A Bash script to automatically update TLSA (DANE) DNS records on Cloudflare after certificate renewals. Adjust your domain in the sh-script, please!

What it does

  1. Loads Cloudflare API credentials from acme.sh's account.conf
  2. Fetches the live public key hashes (SHA-256) from:
    • tvipper.com:443 (HTTPS)
    • pmg01.tvipper.com:25 (SMTP with STARTTLS)
  3. Compares them against the existing TLSA records in Cloudflare
  4. Updates any records that are out of date (DANE-EE, SPKI, SHA-256 — usage 3, selector 1, matching type 1)

The three TLSA records managed:

  • _443._tcp.tvipper.com
  • _25._tcp.tvipper.com
  • _25._tcp.pmg01.tvipper.com

Requirements

  • bash
  • openssl
  • curl
  • python3
  • acme.sh installed at /root/.acme.sh/ with Cloudflare credentials saved

Usage

chmod +x update_tlsa.sh
sudo ./update_tlsa.sh

Run this after each certificate renewal (e.g. via an acme.sh deploy hook or cron job).

Automation

To run automatically after acme.sh renews certificates, add it as a deploy hook or schedule it with cron:

0 3 * * * /path/to/update_tlsa.sh >> /var/log/update_tlsa.log 2>&1

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages