Squid + NCSA
Добавлено: 2008-10-27 9:55:47
собрал squid с авторизацие пользователей по логину и паролю ... но мне вот например надо запретить одному пользователю сайт какой либо (в данном случае http://vkontakte.ru ) ... как это сделать без стороннего ПО? Средствами squid ?
вот конфиг squid ...
http_port 3128
visible_hostname s1
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 128 MB
error_directory /usr/local/etc/squid/errors/Russian-1251
maximum_object_size 16384 KB
cache_dir ufs /usr/local/squid/cache 2000 16 256
cache_access_log /usr/local/squid/logs/access.log
cache_log /usr/local/squid/logs/cache.log
cache_store_log /usr/local/squid/logs/store.log
ftp_user trausernet@gmail.ru
auth_param basic program /usr/local/libexec/squid/ncsa_auth /usr/local/squid/passwd
auth_param basic children 5
auth_param basic realm DPK.irk.proxy
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.0/8
acl squidusers proxy_auth REQUIRED
acl porno url_regex "/usr/local/squid/porno"
acl filess urlpath_regex -i \.flv$ \.avi$ \.swf$ \.com$ \.iso$ \.vob$ \.nrg$ \.mdf$ \.torrent$ \.mp3$ \.wmv$ \.mp4$ \.mpeg$ \.wma$
http_access deny porno
http_access deny filess
http_access allow localhost
http_access allow squidusers
http_access deny all
cache_mgr root@test.ru
cache_effective_user squid
cache_effective_group squid
forwarded_for off
#cachemgr_passwd passwd all
coredump_dir /usr/local/squid/cache
pid_filename /usr/local/squid/logs/squid.pid
вот конфиг squid ...
http_port 3128
visible_hostname s1
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 128 MB
error_directory /usr/local/etc/squid/errors/Russian-1251
maximum_object_size 16384 KB
cache_dir ufs /usr/local/squid/cache 2000 16 256
cache_access_log /usr/local/squid/logs/access.log
cache_log /usr/local/squid/logs/cache.log
cache_store_log /usr/local/squid/logs/store.log
ftp_user trausernet@gmail.ru
auth_param basic program /usr/local/libexec/squid/ncsa_auth /usr/local/squid/passwd
auth_param basic children 5
auth_param basic realm DPK.irk.proxy
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.0/8
acl squidusers proxy_auth REQUIRED
acl porno url_regex "/usr/local/squid/porno"
acl filess urlpath_regex -i \.flv$ \.avi$ \.swf$ \.com$ \.iso$ \.vob$ \.nrg$ \.mdf$ \.torrent$ \.mp3$ \.wmv$ \.mp4$ \.mpeg$ \.wma$
http_access deny porno
http_access deny filess
http_access allow localhost
http_access allow squidusers
http_access deny all
cache_mgr root@test.ru
cache_effective_user squid
cache_effective_group squid
forwarded_for off
#cachemgr_passwd passwd all
coredump_dir /usr/local/squid/cache
pid_filename /usr/local/squid/logs/squid.pid