We're using Varnish 3.0.3. Varnish is behind a load balancer.
We would like to bypass the Varnish cache for a particular IP address. After doing research, I found the following. Unfortunately, it is not working.
acl passem { "7x.xxx.xxx.xxx"; }
sub vcl_recv {
if (!(client.ip ~ passem)) {
return (pass);
}
}
This appears in varnishlog
"6 VCL_acl c NO_MATCH passem"
I'm not sure what is wrong. The only thing I can think of is Varnish is not seeing the incoming IP address. This is what I see in varnishlog
.
6 RxHeader c X-Real-IP: "7x.xxx.xxx.xxx"
6 RxHeader c X-Forwarded-For: "7x.xxx.xxx.xxx"
6 SessionOpen c 10.10.10.4 58143 0.0.0.0:80
6 ReqStart c 10.10.10.4 58143 1026834560
The RxHeader is receiving the correct IP and matches the acl passem
, but I don't know if acl passem
is instead referencing the SessionOpen
IP address, which is the IP address of the load balancer.