Request restriction based on IP and url parameter

Guillaume Quintard guillaume.quintard at gmail.com
Thu Oct 5 11:42:49 UTC 2023


Hi!

It's completely possible, easy and recommended to do that at the
varnish level (at least it you want to cache that content)

How many ips are you actually allowing, are the actual ips or CIDR blocks?

Cheers,

It's definitely something I
On Thu, Oct 5, 2023, 09:55 Anjali Maurya <anjali.maurya01 at indiamart.com>
wrote:

> Hi team,
> We are trying to restrict unauthorized requests at varnish based on a
> parameter and IP associated with the parameter. The parameter value is
> present in the URL and the IP is present in the header. So, we want to know
> if it is possible to implement this restriction based on parameter value
> and associated IP.
> We have different values and associated IPs.
>
> For example:
> URL: hostname:port/path?source=mobile&keyword= bags
> There are 3 IPs associated with mobile source.
> mobile: IP1, IP2, IP3
>
> So if any request comes with mobile and IP4, that is an unauthorized
> request and should be blocked at varnish.
>
> Can we do this at varnish?
>
> If yes, then which approach will be more appropriate handling this at the
> varnish level or handling it using Java code at the API level?
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20231005/7632d897/attachment.html>


More information about the varnish-misc mailing list