1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609
|
<HTML>
<HEAD>
<TITLE>squidGuard - FAQ</TITLE>
<META name="keywords" lang="en" content="faq,squidGuard,squidguard,squid,Squid,free,redirector,filter">
<META name="author" content="Pl Baltzersen">
<META name="copyright" content="© 2000 ElTele st AS.">
</HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
BACKGROUND="/images/background.jpg"
BGCOLOR="#8EE5EE"
TEXT="#000000"
LINK="#0000FF"
VLINK="#000080"
ALINK="#FF0000">
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=100%>
<TR>
<TD ALIGN=LEFT VALIGN=TOP>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD ALIGN=LEFT VALIGN=BOTTOM>
<A HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/"><IMG
SRC="/images/squidGuard.gif" BORDER=0
VALIGN=TOP></A>
<FONT SIZE=+3>
<B>The squidGuard FAQ</B>
</FONT>
<IMG SRC="/images/faq.gif" BORDER=0 VALIGN=TOP>
</TD>
</TR>
<TR>
<TH ALIGN=LEFT VALIGN=TOP>
<FONT SIZE=-1>
<A HREF="/">squidGuard</A> is an ultrafast and free filter,
redirector and access controller for <A
HREF="http://www.squid-cache.org/">Squid</A>
<BR>
By <A HREF="/authors/">Pl Baltzersen</A> and <A
HREF="/authors/">Lars Erik Hland</A>
<BR>
<A HREF="/copyright/">Copyright</A> © 1999-2000, <A
HREF="http://www.ost.eltele.no/">ElTele st AS</A>
</FONT>
</TH>
</TR>
</TABLE>
</TD>
<TD ALIGN=RIGHT VALIGN=TOP>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TH ALIGN=RIGHT>
<FONT SIZE=-1>
<BR>
This page was last modified 2000-08-23
</FONT>
</TH>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<BR>
<BR>
<BR>
<H2>
<IMG SRC="/images/arrow-red.gif" BORDER=0 VALIGN=BOTTOM>
<A NAME="FAQ"></A>
FAQ - Frequently Asked/Answered Questions
</H2>
<P>
Currently in semirandom order:
</P>
<OL>
<LI>
<DL>
<DT>
<B>
<A NAME="1"></A>
<A NAME="maillist"></A>
Is there a mailing list for squidGuard?
</B>
</DT>
<DD>
<A
HREF="/contact/">Yes!</A>.
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="2"></A>
<A NAME="db3x"></A>
I have db3.x.x installed and squidGuard won't compile?
</B>
</DT>
<DD>
Only <A HREF="http://ftp.ost.eltele.no/pub/db/">db2.x.x</A>
versions are supported. We are working on db3.x.x support, but
the API has changed so it may take a while to fix.
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="3"></A>
<A NAME="implicit"></A>
squidGuard does not block?
</B>
</DT>
<DD>
There my be at least 2 reasons for this:
<OL>
<LI>
You didn't end your pass rules with "none". Pass rules ends
with an implicit "all". It is good practice to allways en the
pass rules with either "all" or "none" to make them clear. Ie.
use:
<BR>
<TT>pass good none</TT>
<BR>
or
<BR>
<TT>pass good !bad all</TT>
</LI>
<LI>
squidGuard goes into emergency mode. Reasons may be syntax
errors in the config file, reference to non existing database
files, filprotection problems or missing directories. Check
the squidGuard log.
<BR>
<B>Note:</B>When run under Squid, squidGuard is run with the
same user and group ID as Squid
(<B><TT>cache_effective_user</TT></B> and
<B><TT>cache_effective_group</TT></B> in squid.conf). The
squidGuard configuration and database files must be readable
for this user and/or group and the squidGuard log directory
must be writable for this user and/or group. If not squidGuard
will go into the "pass all for all" emergency mode.
</LI>
</OL>
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="4"></A>
<A NAME="debug"></A>
How do I debug squidGuard?
</B>
</DT>
<DD>
Do something like this:
<BR>
<B><TT>echo "http://foo/bar 10.0.0.1/- - GET" | /usr/local/bin/squidGuard -c /tmp/test.cfg -d</TT></B>
<BR>
This redirects the log to stderr. The response is either a blank
line (pass on) or a the input with the URL part rewritten
(redirect).
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="5"></A>
<A NAME="av"></A>
How can I block audio and video?
</B>
</DT>
<DD>
Use an <A HREF="/config/#Expressionlists">expressionlist</A>
with something like this:
<BR>
<B><TT>\.(ra?m|mpe?g?|mov|movie|qt|avi|dif|dvd?|mpv2|mp3)($|\?)</TT></B>
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="6"></A>
<A NAME="blacklist_project"></A>
Are there any blacklist exchange plans?
</B>
</DT>
<DD>
Yes, we plan to add an interface to the new web site to allow
proxyadministrators to indirectly add and remove URLs from the
robot config. Though there are still some practical issues to
solve.
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="7"></A>
<A NAME="blacklist_contrib"></A>
How can I contribute to the blacklists?
</B>
</DT>
<DD>
If you have lists of links that would map to missing blacklist
entries, or lists of exceptions/errors, please send them to <A
HREF="mailto:blacklist@squidguard.org">blacklist@squidguard.org</A>
<BR>
<B>Note</B>: The link list must consist of fully qualified URLs,
ie. http://... (<U>not</U> the blacklist format).
<BR>
The exception/error lists must consist of domains and urls as
(potentially) found in the blacklists.
<BR>
Direct additions to the domain and url lists are not very
usefull, since they are the output from the robot; not the
input. Though if you have a long list that would have been
usefull you may of course <I>reverse engineer</I> it through:
<BR>
<TT>sed 's@^@http://www.@;s@$@/@' domains urls >links</TT>
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="8"></A>
<A NAME="testing_timeconstraints"></A>
How can I test timeconstraints
</B>
</DT>
<DD>
You can set a simulated start time with the
<TT><B>-t <EM>yyyy-mm-dd</EM>T<EM>HH:MM:SS</EM></B></TT>
option:
<DL>
<DD>
<TT>
<B>
squidGuard -c test.conf -t 1999-12-31T23:59:30 -d <test.in>test.out 2>test.log
</B>
</TT>
</DD>
</DL>
With the -t option squidGuard parses the given date&time and
calculates an offset from the current time at startup and then
adds this offset to all timevalues during runtime.
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="9"></A>
<A NAME="no_args_form_squid"></A>
squidGuard compiles fine and the tests succeed, but it seems to
pass all when run under Squid
</B>
</DT>
<DD>
There may be at leaste two reasons for this:
<UL>
<LI>
Some versions of Squid (supposedly 2.2.*) silently ignores
argumets to the right of
<B><TT>redirect_program <I>prefix</I>/bin/squidGuard</TT></B>. Solutions
are one of:
<UL>
<LI>
Set the actual config file location at <A
HREF="/install/#Defaultconfigfile">compiletime</A>
with <B><TT>--with-sg-config</TT></B>
</LI>
<LI>
Use a shell wraper with
<B><TT>redirect_program <I>prefix</I>/bin/squidGuard.sh</TT></B>
and make <TT><I>prefix</I>/bin/squidGuard.sh</TT> an
executable shell like:
<DL>
<DD>
<TT>
<B>
#! /bin/sh -
<BR>
exec <I>prefix</I>/bin/squidGuard -c <I>whatever</I>/squidGuard.conf
</B>
</TT>
</DD>
</DL>
</LI>
</UL>
</LI>
<LI>
When run under Squid, squidGuard is run with the same user and
group ID as Squid (<B><TT>cache_effective_user</TT></B> and
<B><TT>cache_effective_group</TT></B> in squid.conf). The
squidGuard configuration and database files must be readable
for this user and/or group and the squidGuard log directory
must be writable for this user and/or group. If not squidGuard
will go into the "pass all for all" emergency mode.
</LI>
</UL>
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="10"></A>
<A NAME="native_lex"></A>
compilation of sg.l on fails with <TT>"sg.l:line ...: Error:
Too many positions"</TT> with native lex
</B>
</DT>
<DD>
Some native versions of lex have problems with sg.l. The
solution is to use <A HREF="/links/#Flex">GNU flex</A> wich is better
anyway. Do "<TT>setenv LEX flex</TT>" if configure selects the
native lex before flex. Flex should compile <I>right out of the
box</I> similar to other GNU programs. (Thanks to
laurent.foulonneau@mail.loyalty.nc).
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="11"></A>
<A NAME="auth_module"></A>
Can I use proxy authenticated user the same way as RFC931/Ident
user?
</B>
</DT>
<DD>
Yes, if you patch Squid < 2.3 with this simple <A
HREF="http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/contrib/squid-2.2-authuser.patch">diff</A>,
kindly contributed by <A
HREF="mailto:antony@abacus.co.uk">Antony T Curtis</A>, the
authenticated user will be passed from Squid to squidGuard. This
patch has apparently already been incorporated in squid-2.3:
<BR>
<TT>
<PRE>
A useful patch to Squid 2.2STABLE which fixes per-user redirection where
the user is authenticated using proxy-auth...
*** src/redirect.c.orig Tue Jun 22 14:04:43 1999
--- src/redirect.c Tue Jun 22 15:46:41 1999
***************
*** 103,108 ****
--- 103,110 ----
cbdataAdd(r, cbdataXfree, 0);
r->orig_url = xstrdup(http->uri);
r->client_addr = conn->log_addr;
+ if (http->request->user_ident[0])
+ r->client_ident = http->request->user_ident; else
if (conn->ident == NULL || *conn->ident == '\0') {
r->client_ident = dash_str;
} else {</PRE>
</TT>
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="12"></A>
<A NAME="perl"></A>
Can I manipulate domains.db and urls.db from Perl?
</B>
</DT>
<DD>
Yes, but you must bind custom comparefunctions. Also note the
domains are stored with a leading ".":
<BR>
<TT>
<PRE>
use DB_File;
sub mirror($) {
scalar(reverse(shift));
}
sub domainmatch($$) {
my $search = mirror(lc(shift));
my $found = mirror(lc(shift));
if ("$search." eq $found) {
return(0);
} else {
return(substr($search,0,length($found)) cmp $found);
}
}
sub urlmatch($$) {
my $search = lc(shift) . "/";
my $found = lc(shift) . "/";
if ($search eq $found) {
return(0);
} else {
return(substr($search,0,length($found)) cmp $found);
}
}
my (%url,%domain);
$DB_BTREE->{compare} = \&urlmatch;
my $url_db = tie(%url, "DB_File", "urls.db", O_CREAT|O_RDWR, 0664, $DB_BTREE)
|| die("urls.db: $!\n");
$DB_BTREE->{compare} = \&domainmatch;
my $domain_db = tie(%domain, "DB_File", "domains.db", O_CREAT|O_RDWR, 0664, $DB_BTREE)
|| die("domains.db: $!\n");
# Now you can operate on %url and %domain just as normal perl hashes:)
# Add "playboy.com" to the domainlist unless it's already there:
$domain{".playboy.com"} = "" unless(exists($domain{"playboy.com"}));
# or use the DB_File functions put, get, del and seq:
# Add "sex.com" and "dir.yahoo.com/business_and_economy/companies/sex"
# and delete "cnn.com":
$domain_db->put(".sex.com","") unless(exists($domain{"sex.com"}));
$domain_db->sync; # Seems to only sync the last change.
$domain_db->del("cnn.com") if(exists($domain{"cnn.com"}));
$domain_db->sync; # Seems to only sync the last change.
$url_db->put("xyz.com/~sex","") unless(exists($url{"xyz.com/~sex"}));
$url_db->sync; # Seems to only sync the last change.
$url_db->sync; # Seems to only sync the last change.
$domain_db->sync; # Seems to only sync the last change.
undef($url_db); # Destroy the object
undef($domain_db); # Destroy the object
untie(%url); # Sync and close the file and undef the hash
untie(%domain); # Sync and close the file and undef the hash</PRE>
</TT>
See the perltie(1) and DB_File(3) man pages that comes with Perl for more info.
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="13"></A>
<A NAME="listdb"></A>
How can I list domains.db or urls.db from Perl?
</B>
</DT>
<DD>
Use a script like this:
<BR>
<TT>
<PRE>
#!/local/bin/perl -w
use strict;
use DB_File;
foreach (@ARGV) {
my (%db, $key, $val);
die("$_: $!\n") unless(-f);
tie(%db, "DB_File", $_, O_RDONLY, 0664, $DB_BTREE) || die("$_: $!\n");
foreach $key (keys(%db)) {
if($val = $db{$key}) {
$val = "\"$val\"";
} else {
$val = "undef";
}
print "$key -> $val\n";
}
untie(%db);
}</PRE>
</TT>
See the perltie(1) and DB_File(3) man pages that comes with Perl for more info.
</DD>
</DL>
</LI>
<BR>
<LI>
<DL>
<DT>
<B>
<A NAME="14"></A>
<A NAME="/bin/false"></A>
How can I get around "make: don't know how to make /bin/false. Stop"?
</B>
</DT>
<DD>
Your system does not have lynx and not /bin/false either: If it
has /usr/bin/false do:
<BR>
<TT>
<PRE>
# ln -s ../usr/bin/false /bin/.</PRE>
</TT>
Alternatively:
<BR>
<TT>
<PRE>
# echo exit 255 >/bin/false
# chmod a+rx /bin/false</PRE>
</TT>
</DD>
</DL>
</LI>
</OL>
<P>
If you have questions and/or answers that should be on the FAQ list
please send them to <A
HREF="mailto:squidguard@squidguard.org?subject=SquidGuard%20FAQ?">squidguard@squidguard.org</A>
</P>
<BR>
<HR WIDTH=40%>
<BR>
<TABLE ALIGN=CENTER CELLPADDING=3 CELLSPACING=0 BORDER=0>
<TR>
<TD ALIGN=CENTER>
<A HREF="http://www.gnu.org/"><IMG
SRC="http://info.ost.eltele.no/icons/gnu-logo.gif" BORDER=0
VALIGN=TOP></A>
</TD>
<TD ALIGN=CENTER>
<A HREF="http://www.perl.com/pub/"><IMG
SRC="http://info.ost.eltele.no/icons/perl-logo.gif" BORDER=0
VALIGN=TOP></A>
</TD>
<TD ALIGN=CENTER>
<A HREF="http://www.sun.com/solaris/"><IMG
SRC="http://info.ost.eltele.no/icons/solaris-logo.gif" BORDER=0
VALIGN=BOTTOM></A>
</TD>
<TD ALIGN=CENTER>
<A HREF="http://www.sun.com/servers/"><IMG
SRC="http://info.ost.eltele.no/icons/sun-logo.gif" BORDER=0
VALIGN=BOTTOM></A>
</TD>
<TD ALIGN=CENTER>
<A HREF="http://www.ost.eltele.no/"><IMG
SRC="http://info.ost.eltele.no/icons/eltele-logo.gif" BORDER=0
VALIGN=BOTTOM></A>
</TD>
</TR>
</TABLE>
<TABLE ALIGN=CENTER CELLPADDING=3 CELLSPACING=0 BORDER=0>
<TR>
<TD ALIGN=CENTER>
<A HREF="http://www.apache.org/httpd.html"><IMG
SRC="http://info.ost.eltele.no/icons/apache-logo.gif" BORDER=0
VALIGN=BOTTOM></A>
</TD>
<TD ALIGN=CENTER>
<A HREF="http://www.squid-cache.org/"><IMG
SRC="http://info.ost.eltele.no/icons/squid-logo.gif" BORDER=0
VALIGN=BOTTOM></A>
</TD>
<TD ALIGN=CENTER>
<A HREF="http://www.squidguard.org/"><IMG
SRC="http://info.ost.eltele.no/freeware/squidGuard/squidGuard.gif"
BORDER=0 VALIGN=BOTTOM></A>
</TD>
</TR>
</TABLE>
<TABLE ALIGN=CENTER CELLPADDING=3 CELLSPACING=0 BORDER=0>
<TR>
<TD ALIGN=CENTER>
<A HREF="http://info.ost.eltele.no/freeware/identd/"><IMG
SRC="http://info.ost.eltele.no/freeware/identd/identd.gif"
BORDER=0 VALIGN=BOTTOM></A>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
|