Block all IPs from Hanoi

I have a website in Vietnam.
Like I am being attacked by many IPs coming from HaNoi.
I want to block 1 city in Hanoi, can’t I block the whole of Vietnam?
Please guide me thanks.

I am not aware if that is possible with Firewall Rules, however you could try using a Transform Rule to catch the from the request then rewrite it to some unknown path like /bad-ip/, therefore following this by either a Firewall Rule if http.request.uri.path contains /bad-ip/ with the action “Block” to present the “1020 Access Denied” page.


Kindly and patiently wait for another reply as maybe someone else might got a different idea and better approach for this so far, otherwise you’d have to use a higher paid plan for some kind of features which require Business or Enterprise which could work with I think and with Cloudflare Workers script :thinking:

Nevertheless, you could also check your Firewall Events and do a lookup for those IP’s (with online tool like and block the whole ASN using Security → WAF → Tools → IP Access Rules.


I would advise activating IUAM (I’m Under Attack Mode)

Also, I would advise viewing the following articles, which deal with DDOS (Distrubted Denial Of Service) attacks

Tip: You can also image the community, which can help you get answers!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.