How to block an IP address/country in Cloudflare.


HostSailor.

Beginner 2.0
If your domain is using Cloudflare nameservers and you are seeing an IP is attacking your domain/server with a DDoS attack, you can simply block the IP or the entire IP range or even the country itself from the Cloudflare panel. Usually, Cloudflare will rate-limit the connections based on the settings, but sometimes it is not good enough to prevent it from attacking the site and making it inaccessible.​
You can watch the video tutorial by clicking here. Please follow the steps provided below to block an IP from the Cloudflare panel:​
  1. Log in to the Cloudflare panel as a privileged user.

    cf1.jpg

  2. Select the website you want to manage.

    cf2.jpg

  3. On the left side menu, you can see the 'Firewall' option. Expand it and select the 'Tools' option.

    cf3.jpg
  4. There you can see the 'IP Access Rules' options. You can add the IP/Range/country name you want to allow/deny/challenge.

    cf4.jpg


  5. There are different options are available to choose one website or all websites in the account. Choose the one you needed and also provide a note if needed and press 'Add'.

    cf5.jpg
  6. Once it is added, the IP will be blocked from connecting to the website. You can remove it later from the same page if needed.
 

Top