LINUX.ORG.RU

Настройка squid и squidGuard


0

0

Помогите - не могу настроить squid и squidGuard: все сайты отображаются и отображаются со всеми изображениями:( . Я установил (emerge) apache,squid,sqidguard. Машина домашняя. В /var/www/localhost/images положил прозрачный однопиксельный blocked.gif, в /var/www/localhost/cgi-bin файл /var/www/localhost/ из дистрибутива squidGuard в котором изменил несколько строк на: $image = "/images/blocked.gif"; # RELATIVE TO DOCUMENT_ROOT $redirect = "http://localhost/images/blocked.gif"; # "" TO AVOID REDIRECTION Вот мой squidGuard.conf: logdir /var/log/squidGuard dbhome /etc/squidGuard/db dest ads { domainlist ads/domains urllist ads/urls log ads redirect http://localhost/images/blocked.gif } dest porn { domainlist porn/domains urllist porn/urls expressionlist porn/expressions log porn } acl { default { pass !ads !porn all redirect htth://localhost/cgi-bin/squidGuard.cgi.in?clientaddr=%a&clientname=%n&c lientident=%i&clientgroup=%s&targetgroup=%t&url=%u } } А это squid.conf: redirector_bypass on redirect_program /usr/bin/squidGuard redirect_children 1 hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? no_cache deny QUERY cache_mem 64 MB cache_dir ufs /var/cache/squid 8192 16 256 ftp_user zubr3@yandex.ru auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours auth_param basic casesensitive off refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 negative_ttl 1 minutes 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 acl Safe_ports port 80 acl Safe_ports port 21 acl Safe_ports port 443 563 acl Safe_ports port 70 acl Safe_ports port 210 acl Safe_ports port 1025-65535 acl Safe_ports port 280 acl Safe_ports port 488 acl Safe_ports port 591 acl Safe_ports port 777 acl Safe_ports port 901 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 http_access deny to_localhost http_access allow localhost http_access deny all http_reply_access allow all icp_access allow all visible_hostname home cachemgr_passwd password all error_directory /usr/lib/squid/errors/Russian-koi8-r coredump_dir /var/cache/squid Все права установлены для squid:squid. При заходе на сайт из списка bighotporn.com он пишет в /var/log/squidGuard/porn: 2005-07-11 20:51:22 [9101] Request(default/porn/-) http://bighotporn.com/ 127.0.0.1/localhost - GET 2005-07-11 20:52:45 [9101] Request(default/porn/-) http://bighotporn.com/ 127.0.0.1/localhost - GET 2005-07-11 20:52:46 [9101] Request(default/porn/-) http://bighotporn.com/style/default.css 127.0.0.1/localhost - GET 2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/directnic.gif 127.0.0.1/localhost - GET 2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/head_top.gif 127.0.0.1/localhost - GET 2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/s.gif 127.0.0.1/localhost - GET 2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/head_mid1.gif 127.0.0.1/localhost - GET 2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/favicon.ico 127.0.0.1/localhost - GET Браузеры настроены на home:3128 и их кэш сбрасываю, хотя и использую разные адреса из списков для проверки работоспособности. Подскажите в чем ошибка и как при заходе на эти сайты вывести сообщение вроде тех которые написаны в /usr/lib/squid/errors?


Ответ на: комментарий от OpenStorm

Re(User line break): Настройка squid и squidGuard

Извините - размещаю тот же текст с User line break:
Помогите - не могу настроить squid и squidGuard: все сайты отображаются и отображаются со всеми изображениями:( . Я установил (emerge) apache,squid,sqidguard. Машина домашняя. В /var/www/localhost/images положил прозрачный однопиксельный blocked.gif, в /var/www/localhost/cgi-bin файл /var/www/localhost/squidGuard.cgi.in из дистрибутива squidGuard в котором изменил несколько строк на:
$image = "/images/blocked.gif"; # RELATIVE TO DOCUMENT_ROOT
$redirect = "http://localhost/images/blocked.gif"; # "" TO AVOID REDIRECTION
Вот мой squidGuard.conf:
logdir /var/log/squidGuard
dbhome /etc/squidGuard/db
dest ads {
domainlist ads/domains
urllist ads/urls
log ads
redirect http://localhost/images/blocked.gif
}
dest porn {
domainlist porn/domains
urllist porn/urls
expressionlist porn/expressions
log porn
}
acl {
default {
pass !ads !porn all
redirect htth://localhost/cgi-bin/squidGuard.cgi.in?clientaddr=%a&clientname=%n&c lientident=%i&clientgroup=%s&targetgroup=%t&url=%u
}
}
А это squid.conf:
edirector_bypass on
redirect_program /usr/bin/squidGuard
redirect_children 1
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 64 MB
cache_dir ufs /var/cache/squid 8192 16 256
ftp_user zubr3@yandex.ru
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
negative_ttl 1 minutes
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
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 901
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
http_access deny to_localhost
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname home
cachemgr_passwd password all
error_directory /usr/lib/squid/errors/Russian-koi8-r
coredump_dir /var/cache/squid
Все права установлены для squid:squid. При заходе на сайт из списка bighotporn.com он пишет в /var/log/squidGuard/porn:
2005-07-11 20:51:22 [9101] Request(default/porn/-) http://bighotporn.com/ 127.0.0.1/localhost - GET
2005-07-11 20:52:45 [9101] Request(default/porn/-) http://bighotporn.com/ 127.0.0.1/localhost - GET
2005-07-11 20:52:46 [9101] Request(default/porn/-) http://bighotporn.com/style/default.css 127.0.0.1/localhost - GET
2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/directnic.gif 127.0.0.1/localhost - GET
2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/head_top.gif 127.0.0.1/localhost - GET
2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/s.gif 127.0.0.1/localhost - GET
2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/img/default/head_mid1.gif 127.0.0.1/localhost - GET
2005-07-11 20:52:47 [9101] Request(default/porn/-) http://bighotporn.com/favicon.ico 127.0.0.1/localhost - GET
Браузеры настроены на home:3128 и их кэш сбрасываю, хотя и использую разные адреса из списков для проверки работоспособности. Подскажите в чем ошибка и как при заходе на эти сайты вывести сообщение вроде тех которые написаны в /usr/lib/squid/errors?

zubr3
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.