华岁呀Huasui

华岁呀Huasui

Using CNAME to connect to Cloudflare

image

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

Recently, the website's domain name canceled 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 sites for practice or other purposes. I learned online from friends in the group that I can CNAME access CF. After searching and practicing, 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 the eu.org domain name by yourself)

Fallback source: hk.huas.eu.org (hk can be arbitrary, my source station is an HK machine, and hk is used as a third-level domain resolution for easy identification)

Host domain name: halo.vlo.cc

NS Access to Source Domain Name#

Ignore this step if the domain name has already been accessed.

[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, SaaS subscription needs to be enabled!

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

When enabling, you will be prompted to choose a payment method. Bind PayPal or credit card in advance.

Source Server Settings#

  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 display 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#

One domain name (hosted on CF) can only add one fallback source; if there are multiple servers, you can freeloading several free domain names hosted on CF as fallback source domain names.

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

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

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.