To control the source of access to your business resources, you can use the IP blocklist/allowlist feature in Tencent Cloud CDN.
By configuring an access control policy on IPs of user requests, you can effectively control the source of access, preventing hotlinking by malicious IPs, attacks, etc.
Log in to the CDN Console, select Domain Management on the left sidebar, and click Manage on the right of the domain name to enter its configuration page. Under the Access Control tab, find the IP blocklist/allowlist configuration, which is disabled by default:
Switch to select "IP Blocklist" or "IP Allowlist", enter the list of IPs or IP ranges, and click OK to enable IP blocklist/allowlist configuration:
If a client IP matches an IP or IP range in the blocklist, the accessed CDN node will directly return a 403 status code.
If a client IP does not match any IP or IP range in the allowlist, the accessed CDN node will directly return a 403 status code.
IP:portformat and can contain up to 50 entries.
You can switch to disable the IP blocklist/allowlist feature. When the switch is off, this feature will not take effect in the production environment even if there is an existing configuration. When the switch is on, a message will be displayed to confirm whether to enable this feature before the configuration takes effect across the entire network.
If your acceleration domain name is configured for global acceleration, the IP blocklist/allowlist will take effect globally. This configuration does not distinguish between requests from and outside of Mainland China.
Suppose the IP blocklist/allowlist configuration of the acceleration domain name
www.test.com is as follows:
The actual access status will be as follows:
184.108.40.206accesses the resource
http://www.test.com/test.txt. As the IP matches an IP in the allowlist, the requested content will be returned.
220.127.116.11accesses the resource
http://www.test.com/test.txt. As the IP does not match any IP in the allowlist, a 403 status code will be returned.