Blocking certain IPs from visiting the website may be necessary for some reason, and with appache or nginx, the webmaster can achieve this easily, while for varnish, which acts before nginx or appache, one need to configure varnish correctly.
At the beginning of the default.vcl, put the below codes:
acl unwanted {
"69.60.116.97";
"69.60.116.197";
}
And in the sub vcl_recv entry, put the code:
sub vcl_recv {
if (client.ip ~ unwanted) {
error 410;
}
restart your varnish and everything is done now.





