Cloudflare ERR_SSL_VERSION_OR_CIPHER_MISMATCH with GCP

Background

Client -> Cloudflare -> GCP LB -> Backend

To achieve this flow for traffic proxying and security, I encountered an unexpected issue during the setup process

Symptoms

After configuring Cloudflare to set the DNS as Proxy, I started encountering the error (ERR_SSL_VERSION_OR_CIPHER_MISMATCH) when trying to access the website

Root Cause: Compatibility of Cloudflare with Multi-Level Subdomains

I discovered that the core issue lies in Cloudflare’s Universal SSL certificate. Cloudflare’s Universal SSL only supports single-level subdomains (e.g., *.example.com) and does not support multi-level subdomains (such as *.subdomain.example.com or sub.subdomain.example.com).

This means that even though the connection between the Load Balancer and Cloudflare is encrypted, Cloudflare still cannot provide a valid SSL connection when I access multi-level subdomains, resulting in a handshake failure error.

Solution

In my case, I reviewed all DNS records and converted multi-level subdomains to single-level subdomains. By converting multi-level subdomains to single-level, Cloudflare’s Universal SSL certificate could function correctly.

問題背景

Client -> Cloudflare -> GCP LB -> Backend

為了實現以上情境來處理流量的代理和安全性。我在設置過程中卻遇到了一個意料之外的問題


問題症狀

當我在 Cloudflare 設定完將 DNS 轉成 Proxy 後,訪問網站時反而遇到 (ERR_SSL_VERSION_OR_CIPHER_MISMATCH)


問題根源:Cloudflare 與多層子域名的兼容性

最終,我發現問題的核心在於 Cloudflare 的 Universal SSL 憑證。Cloudflare 的 Universal SSL 憑證僅支援單層子域(例如 *.example.com),但不支援多層子域(如 *.subdomain.example.comsub.subdomain.example.com)。

這意味著,即使 Load Balancer 和 Cloudflare 之間的連線已經加密,當我訪問多層子域名時,Cloudflare 仍無法提供有效的 SSL 連線,導致握手失敗的錯誤。


解決方法

依照我的案例,我檢查了所有 DNS List 並且將多層子玉轉乘 DNS

  1. 將多層子域轉換為單層子域
    將多層子域轉換為單層子域,這樣 Cloudflare 的 Universal SSL 憑證也可以正常運作。

參考網站:

ERR_SSL_VERSION_OR_CIPHER_MISMATCH | Cloudflare SSL/TLS docs
Learn how to troubleshoot ERR_SSL_VERSION_OR_CIPHER_MISMATCH when using Cloudflare SSL/TLS.

圖片來源:https://www.cloudflare.com/integrations/google-cloud/

Read more

如何安裝 KubeSphere 以及管理 Workspace 和新增 Label

前言 在 Kubernetes 的世界中,KubeSphere 是一個功能強大的開源容器平台,它不僅讓 Kubernetes 的管理更簡單,還集成了多集群管理、DevOps、微服務治理等功能。本篇文章將教您如何使用 Helm 快速安裝 KubeSphere,並如何通過管理 Workspace 和新增 Label 來實現資源的高效管理。 一、使用 Helm 安裝 KubeSphere 1. 為什麼選擇 Helm 安裝? Helm 是 Kubernetes 中廣泛使用的包管理工具,使用 Helm 安裝 KubeSphere 有以下優點: * 自動化:簡化安裝過程,減少手動配置。 * 靈活性:可以根據需求自定義安裝的模組。 * 版本控制:支持管理和回滾安裝的不同版本。 2. 安裝前準備 在開始安裝之前,請確保以下條件:

By Tim Chiagn

我的經驗

1. 網絡與安全 (Networking & Security) * Fortigate: 防火牆來管理網路環境 * Traefik: 用於 K8s 的 2. 虛擬化與存儲 (Virtualization & Storage) * Esxi: 買了一台server 使用 Esxi 管理 vm * TrueNAS: 還沒有買 NAS 使用這個加減用一下 3. DevOps 與持續交付 (DevOps & CI/CD) * ArgoCD: GitOps 工具,用於 Kubernetes 的應用交付和管理,支持自動化部署和同步。 * KubeSphere:提供完整的 CI/CD 工作流管理、應用部署和 DevOps 整合功能,是 Kubernetes

By Tim Chiagn