Re: [squid-users] Your opinion: Squid and MySQL interaction, for redirecting users? Is it possible?

From: Gavin McCullagh <gavin.mccullagh_at_gcd.ie>
Date: Sun, 22 Nov 2009 19:52:20 +0000

Hi,

On Sun, 22 Nov 2009, Jonas Brunsgaard wrote:

> I have the squid, i have the MySQL data. But how do I make the Squid
> distinguish between blocked and not blocked. And further how do I
> redirect blocked users to the internal "you are a bad boy" page.

We do something like this by keeping the blocked IPs in a file.

  acl blockedclients src "/etc/squid/blocked_ips"
  http_access deny blockedclients
  deny_info http://www.our.tld/temp/message.html blockedclients

A simple method might be to just regenerate the file once an hour on a cron
job?

Gavin
Received on Sun Nov 22 2009 - 19:52:23 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 23 2009 - 12:00:04 MST