[squid-users] deny_info and squid's own IP address?

Amish anon.amish at gmail.com
Mon Apr 30 12:54:22 UTC 2018


Hello

I have 2 LAN interface on squid box, say department A (192.168.1.1/24) 
and department B (192.168.2.1/24)

I have few banned sites. Say Facebook.

I have HTTP server (running on same server as squid) which shows custom 
pages with custom logo based on IP address.

When request comes for a banned site I would like client to be 
redirected based on squid's own IP.

Something like this:

acl blockedsites url_regex facebook
http_access deny blockedsites
deny_info http://SQUID-IP/banned.html blockedsites

I need SQUID-IP to be replaced by 192.168.1.1 or 192.168.2.1 depending 
on the IP on which connection came to.

For department A it would become http://192.168.1.1/banned.html and
For department B it would become http://192.168.2.1/banned.html.

I checked deny_info documentation page: 
http://www.squid-cache.org/Doc/config/deny_info/

But there is no such option. %h gives host name and not the IP.

So how do I do that? Did I miss any thing.

Thanks in advance for any help,

Amish.



More information about the squid-users mailing list