Skip to content

Nuface Blog

隨意隨手記 Casual Notes

Menu
  • Home
  • About
  • Services
  • Blog
  • Contact
  • Privacy Policy
  • Login
Menu

Category: Cybersecurity

About Cybersecurity

Postfix + Let’s Encrypt + BIND9 + DANE Fully Automated TLSA Update Guide

Posted on 2025-12-032025-12-03 by Rico

— Example: mail.it.nuface.tw (DNSSEC-enabled) 📌 Introduction DANE (DNS-based Authentication of Named Entities) brings strong, DNSSEC-backed authentication to SMTP over TLS. By publishing a TLSA record protected by DNSSEC, you can let sending MTAs verify: When using the recommended mode: You bind the certificate’s SubjectPublicKeyInfo fingerprint (SHA-256) into DNS. ❗ Why automation is mandatory? Let’s Encrypt…

Read more

Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學

Posted on 2025-12-032025-12-03 by Rico

📌 前言 在上一章介紹 DANE 時,我們提到 DANE(DNS-based Authentication of Named Entities)透過 DNSSEC 加簽的 TLSA 記錄,讓寄件端 MTA 在進行 SMTP over TLS(port 25)時: 若使用 TLSA(3 1 1)模式,就表示綁定的是「伺服器公鑰指紋」。因此只要 你的憑證更新,公鑰可能跟著變動 → TLSA 記錄也必須同步更新。 Let’s Encrypt 憑證 90 天更新一次。若 TLSA 沒同步更新,就會造成使用 DANE 的收件端拒收郵件,例如: 因此: 🎯 憑證自動更新 + TLSA 自動更新 + BIND DNSSEC 自動簽署 = 必須全自動化 這篇文章將示範我在 mail.it.nuface.tw 伺服器上的完整自動化流程。 🧩 系統架構與前置條件 本文章以你的實際環境為例:…

Read more

Deploying DANE in Postfix

Posted on 2025-12-032025-12-03 by Rico

— Real-World Example with mail.it.nuface.tw and BIND9 0. Environment Overview Goal: 1️⃣ Generate TLSA data (3 1 1) from your certificate We’ll use this common combination: So the TLSA record will look like: TLSA 3 1 1 <fingerprint> Run this inside your mail container: You’ll get something like: Keep this value for the TLSA record….

Read more

如何在 Postfix 中部署 DANE

Posted on 2025-12-032025-12-03 by Rico

—— 以 mail.it.nuface.tw + BIND9 自建 DNS 為實例 0. 環境說明 目標:✅ 為 mail.it.nuface.tw:25 建立 TLSA 記錄✅ 在 BIND9 zone 中加入 DANE✅ 讓 Postfix 對外寄信時啟用 DANE 驗證對方憑證✅ 對外來信者提供 DANE 能驗證的憑證資訊 1️⃣ 從憑證產生 TLSA 指紋(3 1 1) 我們使用常見且實務上最好用的組合: 也就是: TLSA 3 1 1 <指紋> 在你的 mail 容器裡執行(或掛載憑證後,在主機跑也可以): 輸出會像這樣(示意): 這一長串 64 個十六進位字元,就是 TLSA 3 1 1 要用的值。 2️⃣…

Read more

DANE: DNSSEC-Based TLS Protection

Posted on 2025-12-032025-12-03 by Rico

📌 Introduction As mentioned in the MTA-STS article, SMTP over TLS is vulnerable to downgrade and MITM attacks. MTA-STS improves security but still relies on HTTPS, CA certificates, and DNS TXT records, which may be intercepted or manipulated. For environments requiring even stronger, cryptographically verifiable security, there is DANE (DNS-based Authentication of Named Entities). DANE…

Read more

DANE:基於 DNSSEC 的 TLS 保護

Posted on 2025-12-032025-12-03 by Rico

📌 前言 在說明 MTA-STS 時,我們提到它可以「強制 TLS 加密」與「驗證憑證」,但仍存在以下限制: 因此,對安全性要求更高的企業或政府單位,更偏好採用 DANE(DNS-based Authentication of Named Entities)。 DANE 從根本上解決了憑證信任問題: 👉 「把 TLS 憑證資訊寫死在 DNS 中,並透過 DNSSEC 簽章保護」👉 任何憑證遭竄改、替換、MITM,都會立即被拒收 🔐 什麼是 DANE? DANE 是一種使用 DNSSEC 驗證 TLS 憑證的安全機制。 簡單說: DANE 比 MTA-STS 更安全,因為: ✔ 完全防止 MITM ✔ 無法被降級攻擊 ✔ 憑證必須與 DNSSEC 所公布的內容完全一致 ✔ 不需要 CA、甚至可用自簽憑證(但必須與 TLSA 匹配) 🧩 DANE 的三項必要條件…

Read more

MTA-STS: SMTP Strict Transport Security

Posted on 2025-12-032025-12-03 by Rico

📌 Introduction Traditional SMTP transmits email in plaintext, which makes it vulnerable to downgrade attacks, DNS spoofing, and man-in-the-middle (MITM) attacks. To strengthen email security, major providers like Google, Microsoft, and Yahoo introduced MTA-STS (Mail Transfer Agent – Strict Transport Security). The goal of MTA-STS is simple: 👉 Force all sending MTAs to use encrypted…

Read more

MTA-STS:SMTP 加密強制政策

Posted on 2025-12-032025-12-03 by Rico

📌 前言 電子郵件在傳輸過程中,本質上是明文的。如果中間遭遇 DNS 欺騙、降級攻擊(downgrade attack)或中間人攻擊(MITM),郵件的內容和憑證就可能被攔截或竄改。為提升郵件安全性,Google、Microsoft、Yahoo 等大型郵件供應商提出 MTA-STS(Mail Transfer Agent – Strict Transport Security)標準。 MTA-STS 的目的很簡單: 👉 強制所有寄件伺服器使用 TLS 加密,並驗證憑證,否則拒絕投遞。 🔐 什麼是 MTA-STS? MTA-STS 是一種針對 SMTP 的安全強化機制,允許網域擁有者發布政策,要求其他郵件伺服器: 如果寄件端無法建立安全連線,郵件就會被暫存或退回,而不是以明文方式傳輸。 🧩 MTA-STS 的四大組成 1️⃣ DNS TXT 記錄 宣告你的網域啟用 STS 服務: id 代表版本,只要政策更新就需要調整。 2️⃣ HTTPS 端點(固定 URL) 寄件方會透過 HTTPS 下載你的 STS 政策: 要求: 3️⃣ MTA-STS 政策檔案(Policy File) 範例:…

Read more

How to Check CentOS 6 SSH Ciphers, Use Safe Compatibility Flags & Safely Upgrade OpenSSH

Posted on 2025-11-192025-11-19 by Rico

Connecting from Ubuntu 22.04 / 24.04 to a legacy CentOS 6 server often results in errors such as: Why?👉 CentOS 6 uses OpenSSH 5.x — extremely outdated and incompatible with modern SSH security requirements. This article explains: 🟦 1. How to Check Which Ciphers / Key Exchange / HostKey Types CentOS 6 Supports Even if…

Read more

如何檢查 CentOS 6 SSH 支援的 Cipher / 協定、設定兼容參數、以及安全升級 OpenSSH

Posted on 2025-11-192025-11-19 by Rico

當我們從新版 Linux(如 Ubuntu 22.04 / 24.04)連線到 CentOS 6 時,常會因為 OpenSSH 過舊而發生連線錯誤,例如: 造成原因很簡單:👉 CentOS 6 的 OpenSSH 版本嚴重過時(OpenSSH_5.x),只支援舊算法。 這篇文章分成三個部分,協助你安全、有效率地處理 CentOS 6 連線問題: 🟦 1. 如何確認 CentOS 6 支援哪些 Cipher / KEX / HostKey 即使 SSH 連不上,你仍可以在本地查詢目標主機支援的協定: 方法一:使用 ssh -vvv 顯示完整交涉資訊(最簡單) 重點段落: 這裡就可以看到 CentOS 6 提供的: 方法二:直接查詢 SSHD 設定檔 登入 CentOS 6 後: 常見舊參數: 你會發現所有演算法都是 CBC、Group1、DSA —…

Read more

Posts pagination

  • 1
  • 2
  • Next

Recent Posts

  • Postfix + Let’s Encrypt + BIND9 + DANE Fully Automated TLSA Update Guide
  • Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學
  • Deploying DANE in Postfix
  • 如何在 Postfix 中部署 DANE
  • DANE: DNSSEC-Based TLS Protection

Recent Comments

  1. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on High Availability Architecture, Failover, GeoDNS, Monitoring, and Email Abuse Automation (SOAR)
  2. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on MariaDB + PostfixAdmin: The Core of Virtual Domain & Mailbox Management
  3. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Daily Operations, Monitoring, and Performance Tuning for an Enterprise Mail System
  4. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Final Chapter: Complete Troubleshooting Guide & Frequently Asked Questions (FAQ)
  5. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Network Architecture, DNS Configuration, TLS Design, and Postfix/Dovecot SNI Explained

Archives

  • December 2025
  • November 2025
  • October 2025

Categories

  • AI
  • Apache
  • Cybersecurity
  • Database
  • DNS
  • Docker
  • Fail2Ban
  • FileSystem
  • Firewall
  • Linux
  • LLM
  • Mail
  • N8N
  • OpenLdap
  • OPNsense
  • PHP
  • QoS
  • Samba
  • Switch
  • Virtualization
  • VPN
  • WordPress
© 2025 Nuface Blog | Powered by Superbs Personal Blog theme