Stop users accessing website via IP address
Poul-Henning Kamp
phk at phk.freebsd.dk
Sun Jul 28 09:12:02 CEST 2013
In message <000f01ce8b0a$a872c230$f9584690$@insticator.com>, Puneet writes:
>I want to stop the users accessing my website via IP address.
>I am using varnish as cache.
>I have the following code in place but it is not working.
>
>In vcl_recv() {
> if(req.url ~ "XX.XX.XXX.XXX") {
You should check the req.http.host header, that's where you will
find the IP# or hostname the user used.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-misc
mailing list