squidGuard

The original E-Smith is now called Mitel SME Server V5. There is also a hardware/software bundle referred to as the Mitel 6000 Managed Application Server.

squidGuard works with Squid to block access to sites by domain, ip address or even keywords. It is very flexible, even allowing you to block access at certain times of day and allow it at others, and even to define groups within your organization that have different access privileges.

This all works because Squid allows you to define a redirector program that gets to examine each requested web page before Squid goes and gets it. If the redirector decides to send you somewhere else, that's what happens.


Hate these ads?

I installed squidGuard on an E-Smith server. I used a partially packaged set of rpm's from http://netsourced.com/servers/docs/squidguard-howto.html. Complete directions for the installation are there.

However, although these rpm's appeared to install, it didn't work. Just a little bit of investigation showed that although everything was indeed installed correctly, the supplied conf file ( /usr/local/squidGuard/squidGuard.conf ) didn't quite match the distribution. A little editing fixed it, and a "squid -k reconfigure" started the squidGuard processes running.

Check that with "ps -e | grep squid"- you should see several squidGuard processes running. The number is controlled by the "redirect_children" entry in the squidlog.conf (remember that on E-Smith this file gets created by scripts in /etc/e-smith/templates - the rpm's take care of that for you).

I also needed to adjust the redirect cgi (this is the page that people get redirected to when their access is blocked by squidGuard)- the rpm correctly installs it in the primary/cgi-bin directory (where e-smith html files live), but the supplied conf file doesn't point there.

Here's the configuration file I used:



logdir /usr/local/squidGuard/log
dbhome /usr/local/squidGuard/db








dest local {
        domainlist      local/domains
}



dest untrusted {
   urllist      untrusted/urls
}



dest porn {
   domainlist   porn/domains
   expressionlist       porn/expressions
   urllist      porn/urls
}



dest gambling {
   domainlist   gambling/domains
   urllist      gambling/urls
}



acl {
         default {
             pass  local !in-addr !untrusted !porn !gambling all
             redirect http://e-smith.customer.com/cgi-bin/blocked.cgi?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&url=%u          }
}





Each "dest" entry refers to a directory in /usr/local/squidGuard/db. Each directory can have lists of domains, precise url's or expressions ( see squidGuard for details ) that will be blocked or passed. For example, the file "local/domains" just contains one line:



192.168.2.8


That's the local address of the internal web server. Normally, raw ip addreses are always blocked ( by the "!in-addr" in the "pass" section of the acl ), but we want to let the internal machine be accessed that way. The "local" database accomplishes that.

The "untrusted" database contains specific sites that this client wants to block:



amgolf.com
basketballnews.com
cypriankeyes.com
flowgo.com
go.com
golfcourse.com
golfdigest.com
golfonline.com
golfriverbend.com
golfweb.com
jcrew.com
patriots.com
pgatour.com
shakerhills.com
ticketmaster.com
weather.com
espn.com
espn.go.com
fleet.com
fleetcenter.com
sportingnews.com
cdnow.com
hockeysfuture.com
homelink.fleet.com
ediets.com





The "porn" and "gambling" databases were supplied by the RPM's. Good examples of using expressions are found in the porn/expressions files; I'm not going to reproduce that here because it would cause this page to get indexed for searches I don't want it to show up in!

I tested with lynx by setting



http_proxy="http://e-smith.yourdomain.com:3128"
export http_proxy


but you could of course also test from any client that is using the proxy. Keep in mind that if you are using NAT (the default on E-smith), any user that knows how to NOT use the proxy can just bypass all this entirely.

Also see http://www.mail-archive.com/devinfo%40lists.e-smith.org/msg04815.html



Comments /Unixart/squidguard.html


Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner

cartoon
Forget the expense of flying to New England. Forget hotel and meals costs.
Installation and light training Boston and New England


Views for this page
Today This Week This Month This Year  Overall
533853,719 43,865

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Reviews
       - Networking
       - Security
       - Web/HTML
       - Linux
       - Unix
       - SME




Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://thatitguy.com Business networking servers, Linux and Unix experts. In business since 1997! Windows and Exchange to Samba and Scalix migration experts.


SCO, OpenServer, UnixWare, software, servers, security, networks, installation, administration, troubleshooting, maintenance, Watchguard, firewalls, VPNs, e-mail. Visit us at http://opensystemscomputing.com and www.go2unix.com.


http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!




card_image








Change Congress


Related Posts