how to start squidguard in squid

I have installed squid 2.7 and squidguard from OpenSuse repositories,and I use “redirect_program /usr/sbin/squidGuard -c /etc/squidguard.conf -d” in /etc/squid/squid.conf,but seems that the squidguard is not started after restart squid,
however,when I initialize the blacklist by “squidguard -C all”,the cursor keeps blinking for quite a long time,what should I do :’(:’(

Have you first checked the configuration following the instructions at the squidguard site?

SquidGuard

yes,as for the testing first,I only wrote some basic configuration in /etc/squidguard.conf

How did you test if squidGuard is started? It will spawn only when a page is requested through squid.

A quite good how-to about it is available here but it is in french. Skip to the configuration since you already have it installed.

Pay attention to the ownership of the db files like it is stated on the squidGuard website (the chown command), if the user under which squid is running does not have read/write rights to them, they won’t be usable.

The “squidGuard -C all” should take a lot to complete so wait for it. If you want to see if it’s working, I think you can add -d to it to see if any errors.

On the other hand, I do not think you should have -d option used in the squid.conf.

Good luck.

Well not quite, squid will start several instances ahead of time, the number of which can be set, I think it defaults to 5.

You can also test squidguard by running on the command line and typing into it, since when used by squid it reads stdin and outputs on stdout, as a URL rewriter should.

Note that the directive name for URL rewriters changed in recent squids, you should read the comments in squid.conf to see what it’s called these days.

Hi ghostintheruins,

I have test it,but when I did “chown -R <squiduser> /var/lib/squidGuard/db/*”,it tells me that the “squiduser” I put is invalid,only the users on the Suse box are valid,but I have put a auth_param in squid.conf to lead it to the squid_ldap_auth -h <my ldap IP>.

Indeed ken_yap the squidGuard do spawn at squid startup. It’s been a while since I configured it.

supercools:

<squiduser> needs to be replaced with the actual user and group squid is running.

See here: SquidGuard - openSUSE

In squid.conf:

cache_effective_user
cache_effective_group

The default value is “nobody” but it might be also “squid”. For the group it should be nogroup

You can see the user in top or try htop which has more options.

Unfortunately I can not help you with step by step instructions since I did not configure squid / squidGuard on opensuse and also I did not configure authorization against a ldap database like you are trying.

Also, like ken_yap said, I would suggest that you have one read of squid.conf even if it is long so you get acquainted to its options.

Look for errors in the squidGuard log - see the logdir option in squidGuard.conf

Did you let “squidguard -C all” finish? You need to chown the db files afterwards.

Good luck.