Page 1 of 1

How to block some IP if the website is behind CloudFlare

Posted: Sat Apr 26, 2025 3:51 pm
by T4B
hey i did block a ip address from firewall
but the ip still connect the site
then i block it using cloudflare then stops traffic
server firewall ignore if i have enabled cloudflare for the website ?

Re: Cloudflare enabled sites traffic

Posted: Sat Apr 26, 2025 4:00 pm
by T4B
Use the following commands to block ip:

Code: Select all

touch /etc/nginx/conf.d/block.conf

echo "deny 111.222.111.222;" >> /etc/nginx/conf.d/block.conf
# just put IP you want to ban instead of 111.222...

systemctl restart nginx