Here's the way I understand things:
One of the main reasons that squidGuard retains its speed (even with
very large numbers of domains and urls), is that it stores all of the
domains and urls in B-trees. (See
<http://whatis.techtarget.com/definition/0,289893,sid9_gci508442,00.html
>)
At startup, squidGuard will look in the directory for domains.db and
urls.db. If it does not find them, it will look for the text files
domains and urls. If it finds those, squidGuard will create a run-time
B-tree structure from the text files (the time required to create the
B-tree is determined by the number of entries in the text files) and go
into operation. When squidGuard is stopped, that B-tree structure is
lost and will be recreated during the next startup from the text files.
Running <squidGuard -C> tells squidGuard to create the B-tree structures
using the text files, and then store those B-trees as domains.db and
urls.db. The next time squidGuard is started there is no time wasted on
created the B-trees; the db files are immediately loaded and squidGuard
is ready to roll.
I'd like to mention something else concerning your squidGuard.conf file.
All of your hits are being redirected to the same file. I don't know
about the contents of your /ads/domains and /ads/urls, but on my system
that db is used to eliminate a large number of the ads that are so
distracting on a web page. If you use the same redirect for those you
will be trying to write your redirect page into every little space where
you've blocked an ad.
If you specify your redirect within each dest definition you can have a
different redirect for each type. For example:
dest porn {
domainlist porn/domains
urllist porn/urls
redirect http://myserver.com/403prn.html
logfile /usr/local/squidGuard/log/porn.log
}
I use the same redirect for all categories except for the ads:
dest ads {
domainlist ads/domains
urllist ads/urls
redirect http://myserver.com/1x1.gif
}
I have attached 1x1.gif for your use. It is a 1 pixel by 1 pixel
transparent gif. Instead of the ad, 1x1.gif is pulled in and resized to
fit. So instead of a flashing monkey running back and forth, you see...
nothing.
I hope you find this helpful.
-----Original Message-----
From: Manuel R. Lujan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 11:21 PM
To: Rick Matthews
Subject: Re: database errors
You are correct with the file locations. When I installed it, I
overlooked
the /usr, so I decided to leave it.
As per your suggestion, I looked and I had conflicting usernames and
groups,
but I changed that to correspond with my squid.conf file
(netmax/netmax).
I bypassed the problem by renaming all of the .db files to
~~domains_or_urls.db.txt
Then I restarted squid and it is working.
One thing that I can't figure out is what the .db files do if squidGuard
works without them.
Also, how do I rebuild the DB files? I think I found the right info,
but am
not sure. Would I run "/local/squid/bin/squidGuard -C all" ?
Thanks for all of your help with this.
Manuel
Rick Matthews wrote:
> Let me verify something else with you - Based on your conf file your
> files are located as follows:
> </local/squid/squidGuard/dbhome/ads/domains>
> </local/squid/squidGuard/dbhome/ads/domains.db>
> </local/squid/squidGuard/dbhome/ads/urls>
> </local/squid/squidGuard/dbhome/ads/urls.db>
> </local/squid/squidGuard/dbhome/porn/domains>
> </local/squid/squidGuard/dbhome/porn/domains.db>
> </local/squid/squidGuard/dbhome/porn/urls>
> </local/squid/squidGuard/dbhome/porn/urls.db>
> </local/squid/squidGuard/dbhome/porn/expressions>
> </local/squid/squidGuard/dbhome/mail/domains>
> </local/squid/squidGuard/dbhome/mail/domains.db>
> </local/squid/squidGuard/dbhome/warez/domains>
> </local/squid/squidGuard/dbhome/warez/domains.db
> </local/squid/squidGuard/dbhome/warez/urls>
> </local/squid/squidGuard/dbhome/warez/urls.db>
> </local/squid/squidGuard/dbhome/hacking/domains>
> </local/squid/squidGuard/dbhome/hacking/domains.db>
> </local/squid/squidGuard/dbhome/hacking/urls>
> </local/squid/squidGuard/dbhome/hacking/urls.db>
>
> Is this correct? (It's not "/usr/local/...."?)
>
> Assuming this is correct, the easiest way to ensure that all of your
> ownerships are set correctly is:
> <chown -R squid.squid /local/squid/squidGuard/dbhome>
>
> Here's the way I would troubleshoot your squidGuard configuration:
>
> Temporarily change this line in your config file:
> pass !porn !ads !hacking !warez !mail all
> to this:
> pass !porn all
>
> Delete:
> </local/squid/squidGuard/dbhome/porn/domains.db>
> and
> </local/squid/squidGuard/dbhome/porn/urls.db>
>
> Copy:
> </local/squid/squidGuard/dbhome/porn/domains>
> to
> </local/squid/squidGuard/dbhome/porn/domains.hold>
>
> Copy:
> </local/squid/squidGuard/dbhome/porn/urls>
> to
> </local/squid/squidGuard/dbhome/porn/urls.hold>
>
> Edit:
> </local/squid/squidGuard/dbhome/porn/domains>
> (Note: If you do not use a Linux editor, ensure that the file stays in
> unix format.)
> Edit the file so that it only contains the following line:
> c-span.org
>
> Edit:
> </local/squid/squidGuard/dbhome/porn/urls>
> (Note: If you do not use a Linux editor, ensure that the file stays in
> unix format.)
> Edit the file so that it only contains the following line:
> unitedmedia.com/comics/dilbert
>
> Then:
> <squidGuard -u>
> <squid -k reconfigure>
>
> Try visiting http://www.c-span.org. You should be blocked. (If you've
> visited that site recently, clear your browser's local cache or simply
> hit reload.)
>
> Try visiting http://www.unitedmedia/comics/dilbert. You should be
> blocked. (If you've visited that site recently, clear your browser's
> local cache or simply hit reload.)
>
> Try visiting http://www.unitedmedia/comics. You should *NOT* be
blocked.
>
> If these tests fail, examine your log file very carefully, starting
from
> the reconfigure and let us know what you find.
>
> -----Original Message-----
> From: Manuel R. Lujan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 11:57 AM
> To: Rick Matthews
> Subject: Re: database errors
>
> Thanks Rick,
> That was part of the problem.
> My db files had my user name and my group, and I changed it to match
the
> squid.conf file.
> now everything is user= netmax group= netmax
> Still did not clear up the porblem though :>{
> -Manuel
--
Manuel R. Lujan
Assistant Technology Coordinator
Huerfano School District Re-1
611 West 7th Street
Walsenburg, CO 81089
Phone: (719) 738-1571 OR (719) 738-1899
Fax: (719) 738-3148
Personal Web page: http://huerfano.k12.co.us/~mlujan/
District Web page: http://huerfano.k12.co.us
Certifications:
CompTIA -- A+ Certified.
Brainbench -- Computer Technical Support, Computer Fundamentals (Win
95/98),
Computer Fundamentals (Mac OS 8.6), Network Technical Support, TCP/IP
Administration, MS Windows 98 Administration, Macintosh OS8 Navigation,
MS
Windows NT 4.0 Workstation Administration, MS Windows 95 Administration.
1x1.gif