华岁呀Huasui

华岁呀Huasui

使用CNAME接入Cloudflare

image

While using domestic DNS resolution, I am also freeloading Cloudflare's defense.

Recently, the website's domain name cancelled the NS access to Cloudflare and switched to Huawei Cloud's DNS resolution. I am planning to use a domestic free CDN for acceleration, but it is only for acceleration and does not provide defense. Although the daily IP of this site may not exceed 10, there are still attacks on other websites for practice or other purposes. I learned online from fellow group members that it is possible to CNAME access CF, and after some searching and practical operation, it is indeed feasible.

Basic Principle#

Fallback source domain name: Access CF through NS, and then configure a DNS (hk.huas.eu.org) to resolve to the source server. Finally, using the host domain name provided by SaaS, CNAME the domain name that needs to be accessed through CF to the fallback source (hk.huas.eu.org).

Preparation#

Cloudflare account

Credit card or PayPal

A domain name (any) accessed through NS to CF (this domain name serves as the source domain name)

A domain name (website domain name) that needs to be accessed through CNAME to CF (custom host domain name)

The two domain names demonstrated in this article are as follows:

Source domain name: huas.eu.org (using the free eu.org domain name, you can find out how to apply for an eu.org domain name)

Fallback source: hk.huas.eu.org (hk can be any value, my source server is in HK, and hk is used as the third-level domain for easy identification)

Host domain name: halo.vlo.cc

NS Access to Source Domain Name#

If the domain name has already been accessed, you can ignore this step.

[Access the source domain name huas.eu](http://Access the source domain name huas.eu).org through NS to Cloudflare

image

SaaS Subscription#

After the source domain name is accessed through NS to the platform, you need to enable SaaS subscription!

Path to enable: [Domain Management] - [SSL/TLS] - [Custom Host] - [Enable Cloudflare for SaaS]

When enabling, you will be asked to choose a payment method. You can bind PayPal or credit card in advance.

Source Server Configuration#

  1. Add a DNS resolution to the source server for the fallback source domain name huas.eu.org

image

  1. Go to Cloudflare for SaaS and add the fallback source domain name

image

Enter the just resolved fallback source domain name and click [Add Fallback Source]. Refresh a few times and wait for the status to show as valid. If an error occurs, please check if the first step of resolution is correct.

Domain Name Addition#

  1. Add a custom domain nameimage2. After adding the domain name, follow the prompts to perform TXT verification (other verification methods are also available)
  2. Add a CNAME resolution, resolving to the fallback source domain name added above (e.g. halo.vlo.cc CNAME resolves to hk.huas.eu.org)

Note#

Only one fallback source can be added for a domain name (hosted on CF); if there are multiple servers, you can freeloading several free domain names on CF as fallback source domain names.

One fallback source supports 100 free host domain names (which should be enough~)

If there is a certificate issue when accessing the domain name, you need to switch to another encryption mode in the [SSL/TLS section] to test if it can be accessed normally.

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。