Restricting access to specific URI

Learning on the job. Completely new to this and I see more than one way to achieve what I desire so I am looking at what is the better option. I think this is possible using URL filtering or using a rule?

Essentially, whilst I want www.234.com to be remain public, I also want to restrict www.234.com**/secure** to only allow a specific set of IPs.

Thanks!

Excuse the typo. The 2nd URL should ready www.234.com/secure.

Okay, sure.

Yes, you can achieve this if your domain is using Cloudflare service.

You could create a Firewall Rule. and restrict it by an IP address or a set of IP addresses as you need.

Example from below, restricted access for the path of mydomain.com/secure to the set of IP addresses only (any request comming from different a IP address than I set would see Access denied - 1020 Error page):

Expression example:

  • (http.request.uri.path contains "/secure" and not ip.src in {1.2.3.4 10.20.30.40 100.200.20.10})

Image example:

Helpful documentation regarding Firewall Rules and usage:

Useful Firewall Tips:

2 Likes

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