swzmephisto
29.07.06, 10:40
Hallo,
ich richte gerade für eine Schule einen Squid ein, damit die Kinder nicht mehr so viele Pornoseiten anschauen können. Leider stehe ich vor dem Problem, dass die ganze Installation genau einmal einmal funktioniert hat. Nach einem Neustart des Systems ist der Rechner nur noch mit auslagern beschäftigt und ich weiß nicht warum. Das geht soweit, dass er es nichtmal mehr schafft, sinch normal herunterzufahren.
Kurz zu dem System: PII 333MHz mit mittlerweile 384 MB SD RAM; eine Grafikkarte und 2x 3Com Netzwerkkarte. Ansonsten ist er leer. Ach eine 4 Gig Platte paritioniert mit ca. 300 MB Swap
Kernel 2.4.27 aber mit einem 2.6er Kernel passiert auch nichts anderes
Installiert ist ein Debian (ich habe es auch mit Ubuntu mal versucht; gleiche Symptome)
Auf dem Debian ist ein Apache, Squid und Squidguard installiert.
Die Filterregeln für squidguard habe ich über das "blacklist-update"-Skript von http://www.bn-paf.de/filter/ erstellt.
Wenn der Proxy läuft, werden 5 Squidguards mitgestartet die in der Prozessor bzw speicherauslastung nicht wirklich auffällig sind.
Im Leerlauf:
ps uax | grep squid
root 1163 0.0 0.3 4420 1200 ? Ss 11:36 0:00 /usr/sbin/squid -D -sYC
proxy 1166 0.4 1.2 7332 4660 ? S 11:36 0:00 (squid) -D -sYC
proxy 1167 5.5 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1168 5.4 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1169 5.2 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1170 5.4 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1171 5.4 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
Bei Zugriff:
ps uax | grep squid
root 1163 0.0 0.3 4420 1200 ? Ss 11:36 0:00 /usr/sbin/squid -D -sYC
proxy 1166 0.1 1.2 7340 4704 ? S 11:36 0:00 (squid) -D -sYC
proxy 1167 9.2 0.5 6792 1948 ? Ds 11:36 0:10 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1168 10.5 0.5 6792 1948 ? Ds 11:36 0:11 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1169 10.7 0.5 6792 1948 ? Ds 11:36 0:11 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1170 13.9 0.5 6792 1948 ? Rs 11:36 0:15 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1171 9.2 0.5 6792 1948 ? Ds 11:36 0:10 (squidGuard) -c /etc/squid/squidGuard.conf
proxy:~# cat /etc/squid/squid.conf | egrep ^[^#]
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl our_networks src 10.0.10.0/24
http_access allow our_networks
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
proxy:~# cat /etc/squid/squidGuard.conf | egrep ^[^#]
dbhome /var/lib/squidguard/db
logdir /var/log/squid
time workhours {
weekly mtwhf 08:00 - 16:30
date *-*-01 08:00 - 16:30
}
dest eigene {
domainlist eigene/domains
urllist eigene/urls
log blocked.log
}
dest ads {
domainlist ads/domains
urllist ads/urls
redirect 302:http://127.0.0.1/1x1.gif
}
dest aggressive {
domainlist aggressive/domains
urllist aggressive/urls
log blocked.log
}
dest audio-video {
domainlist audio-video/domains
urllist audio-video/urls
log blocked.log
}
dest drugs {
domainlist drugs/domains
urllist drugs/urls
log blocked.log
}
dest gambling {
domainlist gambling/domains
urllist gambling/urls
log blocked.log
}
dest hacking {
domainlist hacking/domains
urllist hacking/urls
log blocked.log
}
dest mail {
domainlist mail/domains
urllist mail/urls
log blocked.log
}
dest porn {
domainlist porn/domains
urllist porn/urls
log blocked.log
}
dest violence {
domainlist violence/domains
urllist violence/urls
log blocked.log
}
dest warez {
domainlist warez/domains
urllist warez/urls
log blocked.log
}
dest local-ok {
domainlist custom/local-ok/domains
urllist custom/local-ok/urls
}
destination local-block {
domainlist custom/local-block/domains
urllist custom/local-block/urls
log blocked.log
}
acl {
default {
pass local-ok !local-block !eigene !ads !aggressive !audio-video !drugs !gambling !hacking !porn !violence !warez all
redirect 302:http://10.0.10.113/forbidden/redirect.php?site=%u&class=%t
}
}
du -sh /var/lib/squidguard/db/*
40K /var/lib/squidguard/db/ads
12K /var/lib/squidguard/db/aggressive
12K /var/lib/squidguard/db/audio-video
60K /var/lib/squidguard/db/drugs
8,0K /var/lib/squidguard/db/eigene
32K /var/lib/squidguard/db/gambling
16K /var/lib/squidguard/db/hacking
16K /var/lib/squidguard/db/mail
16M /var/lib/squidguard/db/porn
8,0K /var/lib/squidguard/db/violence
12K /var/lib/squidguard/db/warez
ich richte gerade für eine Schule einen Squid ein, damit die Kinder nicht mehr so viele Pornoseiten anschauen können. Leider stehe ich vor dem Problem, dass die ganze Installation genau einmal einmal funktioniert hat. Nach einem Neustart des Systems ist der Rechner nur noch mit auslagern beschäftigt und ich weiß nicht warum. Das geht soweit, dass er es nichtmal mehr schafft, sinch normal herunterzufahren.
Kurz zu dem System: PII 333MHz mit mittlerweile 384 MB SD RAM; eine Grafikkarte und 2x 3Com Netzwerkkarte. Ansonsten ist er leer. Ach eine 4 Gig Platte paritioniert mit ca. 300 MB Swap
Kernel 2.4.27 aber mit einem 2.6er Kernel passiert auch nichts anderes
Installiert ist ein Debian (ich habe es auch mit Ubuntu mal versucht; gleiche Symptome)
Auf dem Debian ist ein Apache, Squid und Squidguard installiert.
Die Filterregeln für squidguard habe ich über das "blacklist-update"-Skript von http://www.bn-paf.de/filter/ erstellt.
Wenn der Proxy läuft, werden 5 Squidguards mitgestartet die in der Prozessor bzw speicherauslastung nicht wirklich auffällig sind.
Im Leerlauf:
ps uax | grep squid
root 1163 0.0 0.3 4420 1200 ? Ss 11:36 0:00 /usr/sbin/squid -D -sYC
proxy 1166 0.4 1.2 7332 4660 ? S 11:36 0:00 (squid) -D -sYC
proxy 1167 5.5 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1168 5.4 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1169 5.2 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1170 5.4 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1171 5.4 0.5 6792 1948 ? Rs 11:36 0:01 (squidGuard) -c /etc/squid/squidGuard.conf
Bei Zugriff:
ps uax | grep squid
root 1163 0.0 0.3 4420 1200 ? Ss 11:36 0:00 /usr/sbin/squid -D -sYC
proxy 1166 0.1 1.2 7340 4704 ? S 11:36 0:00 (squid) -D -sYC
proxy 1167 9.2 0.5 6792 1948 ? Ds 11:36 0:10 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1168 10.5 0.5 6792 1948 ? Ds 11:36 0:11 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1169 10.7 0.5 6792 1948 ? Ds 11:36 0:11 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1170 13.9 0.5 6792 1948 ? Rs 11:36 0:15 (squidGuard) -c /etc/squid/squidGuard.conf
proxy 1171 9.2 0.5 6792 1948 ? Ds 11:36 0:10 (squidGuard) -c /etc/squid/squidGuard.conf
proxy:~# cat /etc/squid/squid.conf | egrep ^[^#]
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl our_networks src 10.0.10.0/24
http_access allow our_networks
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
proxy:~# cat /etc/squid/squidGuard.conf | egrep ^[^#]
dbhome /var/lib/squidguard/db
logdir /var/log/squid
time workhours {
weekly mtwhf 08:00 - 16:30
date *-*-01 08:00 - 16:30
}
dest eigene {
domainlist eigene/domains
urllist eigene/urls
log blocked.log
}
dest ads {
domainlist ads/domains
urllist ads/urls
redirect 302:http://127.0.0.1/1x1.gif
}
dest aggressive {
domainlist aggressive/domains
urllist aggressive/urls
log blocked.log
}
dest audio-video {
domainlist audio-video/domains
urllist audio-video/urls
log blocked.log
}
dest drugs {
domainlist drugs/domains
urllist drugs/urls
log blocked.log
}
dest gambling {
domainlist gambling/domains
urllist gambling/urls
log blocked.log
}
dest hacking {
domainlist hacking/domains
urllist hacking/urls
log blocked.log
}
dest mail {
domainlist mail/domains
urllist mail/urls
log blocked.log
}
dest porn {
domainlist porn/domains
urllist porn/urls
log blocked.log
}
dest violence {
domainlist violence/domains
urllist violence/urls
log blocked.log
}
dest warez {
domainlist warez/domains
urllist warez/urls
log blocked.log
}
dest local-ok {
domainlist custom/local-ok/domains
urllist custom/local-ok/urls
}
destination local-block {
domainlist custom/local-block/domains
urllist custom/local-block/urls
log blocked.log
}
acl {
default {
pass local-ok !local-block !eigene !ads !aggressive !audio-video !drugs !gambling !hacking !porn !violence !warez all
redirect 302:http://10.0.10.113/forbidden/redirect.php?site=%u&class=%t
}
}
du -sh /var/lib/squidguard/db/*
40K /var/lib/squidguard/db/ads
12K /var/lib/squidguard/db/aggressive
12K /var/lib/squidguard/db/audio-video
60K /var/lib/squidguard/db/drugs
8,0K /var/lib/squidguard/db/eigene
32K /var/lib/squidguard/db/gambling
16K /var/lib/squidguard/db/hacking
16K /var/lib/squidguard/db/mail
16M /var/lib/squidguard/db/porn
8,0K /var/lib/squidguard/db/violence
12K /var/lib/squidguard/db/warez