Сильно ламера не пинайте, пожалуйста, имеется проблема со сквидом. Точнее она появилась после определенных нововведений начальства.
Не так давно начальник решил дать жителям нашей сети безлимитный интернет, но с условием: имеется лимит 2гб, после него скорость должна ограничиваться до 128 кбит/с.
Имеется (досталась от предыдущего хозяина) система:
gateway# uname -a
Код: Выделить всё
FreeBSD gateway.lamer.ru 8.1-RELEASE-p5 FreeBSD 8.1-RELEASE-p5 #0: Tue Sep 27 16:18:26 UTC 2011 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
Код: Выделить всё
gateway# pkg_info | grep squid
squid-3.1.19 HTTP Caching Proxy
Код: Выделить всё
gateway# pkg_info | grep sams
sams-1.0.5_5,1 Squid 2.x Accounting Management System
Особенности:
1) - в исходиках самса была правлена конфигурация что бы работала авторизация и подсчет трафика по керберсу, вроде как (при необходимости - инфу скину, а по сути там в 6 строках меняется знак "+" на "@")
Проблемы:
1) В текущей конфигурации, самс удаляет правила делай-пулов, и создает свои (какие бы знаки #,!#, и т.д. я не ставил). Проверял как с тэгами так и без них
2) При отключении пользователя, даже если я сам лично прописываю правила делай-пулов в конфиге сквида и реконфигурирую его (squid -k restart) - не имеет доступа к интернету.
3 и т.д. - если вспомню - допишу, третья ночь почти бессонная (((
Конфиг сквида:
Код: Выделить всё
# created by SAMS _sams_ 2013-4-2 21:33:3
#
# Recommended minimum configuration:
#
visible_hostname proxy.lamer.ru
auth_param negotiate program /usr/local/libexec/squid/squid_kerb_auth -s HTTP/proxy.lamer.ru
auth_param negotiate children 30
auth_param negotiate keep_alive on
auth_param ntlm program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 30
auth_param ntlm keep_alive on
#external_acl_type ADGroup %LOGIN /usr/local/libexec/squid/wbinfo_group.pl
external_acl_type ldapgroup children=30 %LOGIN /usr/local/libexec/squid/squid_ldap_group -R -b "DC=lamer,DC=ru" -f "(&(objectclass=person)(sAMAccountName=%u)(memberOf=CN=%g,OU=Groups,DC=lamer,DC=ru))" -D "CN=unix,CN=Computers,DC=lamer,DC=ru" -w mduserunix -h "192.168.5.5" -v 3 -K -S -d
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 21
acl SSL_ports port 443
acl SSL_ports port 1443
acl SSL_ports port 5190
acl SSL_ports port 5222
acl SSL_ports port 5223
acl SSL_ports port 7000
acl SSL_ports port 8443-8444
acl SSL_ports port 6665-6667
acl Safe_ports port 80 # http
acl Safe_ports port 91 # http for gaydukov - germania proekt
acl Safe_ports port 21 # ftp
acl Safe_ports port 115 # Praga STS
acl Safe_ports port 443 # https
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 554 # rtm
acl Safe_ports port 1935 # AdobeConnect RTMP
acl CONNECT method CONNECT
acl POST method POST
acl InetUsersGroup external ldapgroup InetUsers
acl auth proxy_auth REQUIRED
acl banusers proxy_auth "/usr/local/etc/squid/disabled_id.sams"
acl unbanusers "/usr/local/etc/squid/default.sams"
acl vaio dstdomain ftp.vaio-link.com
acl qip dstdomain new.qip.ru storage.qip.ru download.qip.ru webim.qip.ru
acl MailruAgent dst 94.100.176.0/20
acl ICQ_nets dst 205.188.0.0/16 64.12.0.0/16
acl POST_sites url_regex ^http://*\.mail\.ru/*
acl POST_sites url_regex ^http://*\.yandex\.ru/*
acl HPBulletin url_regex -i ^http://h18004\.www1\.hp\.com/products/quickspecs/*
acl iBanks_dst dst 212.176.15.25/32
acl iBanks_dst dst 212.176.15.37/32
acl iBanks_dst dst 193.200.10.25/32
acl iBanks_dst dst 195.64.205.67/32
acl iBanks_ports port 443 9091
acl ConsUpdates dstdomain robot.cons66.ru
acl KUBank dstdomain telebank.kubank.ru
acl OutpostUpdates url_regex -i ^http://updates.*\.agnitum\.com*
acl Skbkontur dstdomain pki.kontur-extern.ru:443
acl Uralairlines dstdomain www.uralairlines.ru
acl Adobe dstdomain platformdl.adobe.com
acl Bank24 dstdomain online.bank24.ru
acl Bank24_2 dst 194.107.116.242/32
acl Bank24_2 dst 194.107.116.241/32
acl MDMBank dst 194.176.100.33/32
acl Ammy_Admin dst 88.198.6.54/32
acl MSActivate01 url_regex -i ^http://go\.microsoft\.com/fwlink/\?LinkID=*
acl MSActivate02 dstdom_regex activation\.sls\.microsoft\.com$
acl MSActivate03 dstdom_regex productactivation\.one\.microsoft\.com$
acl MSActivate04 dstdom_regex wpa\.one\.microsoft\.com$
acl MSActivate05 url_regex -i ^http://crl\.microsoft\.com/pki*
acl MSEssent dstdom_regex update\.microsoft\.com$
acl Currency url_regex -i ^http://www\.cbr\.ru/scripts/XML_daily\.asp$
acl FPAdobeDownload url_regex -i ^http://get\.adobe\.com/flashplayer
acl FPAdobeDownload2 dstdom_regex fpdownload\.adobe\.com$
acl TestCBR url_regex -i ^http://www\.cbr\.ru/scripts/xml_daily\.asp\?date_req=*
#acl Apple_FaceTime url_regex -i ^http://init\.ess\.apple\.com/WebObjects/VCInit\.woa/wa/getBag\?*
acl Apple_FaceTime dstdom_regex init\.ess\.apple\.com$
acl Apple_FaceTime dstdom_regex invitation\.ess\.apple\.com$
acl Apple_FaceTime dstdom_regex evintl-aia\.verisign\.com$
acl Apple_FaceTime dstdom_regex evintl-ocsp\.verisign\.com$
acl Apple_FaceTime dstdom_regex evsecure-ocsp\.verisign\.com$
acl Apple_FaceTime2 url_regex -i ^http://.*/skypePTT/template/genGetPCServerA11\.xml\?*
acl Rapida dstdom_regex gate\.rapida\.ru$
acl BBub_iPad src 192.168.2.200/32
acl pool1 src 192.168.1.0/24
acl pool2 src 192.168.2.0/27
acl pool3 src 192.168.2.32/27
acl pool4 src 192.168.2.64/27
acl pool5 src 192.168.2.96/27
acl pool6 src 192.168.2.128/27
acl pool7 src 192.168.2.160/27
acl pool8 src 192.168.2.192/27
acl pool9 src 192.168.2.224/27
#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
#http_access allow localhost
#delay_pools 1
#delay_class 1 2
#delay_access 1 allow _sams_disabled_id banusers
#delay_access 1 deny all
#delay_parameters 1 64000/64000 64000/64000
#http_access allow auth
delay_pools 2
delay_class 1 2
delay_class 2 2
delay_access 1 allow banusers
delay_access 1 deny all
delay_access 2 allow unbanusers
delay_access 2 deny all
delay_parameters 1 -1/-1 16000/16000
delay_parameters 2 -1/-1 1600000/1600000
http_access allow vaio
http_access allow ICQ_nets
http_access allow qip
http_access allow MailruAgent
http_access allow iBanks_dst
http_access allow Bank24
http_access allow Bank24_2
http_access allow MDMBank
http_access allow KUBank
http_access allow ConsUpdates
http_access allow OutpostUpdates
http_access allow Uralairlines
http_access allow Skbkontur
http_access allow MSActivate01
http_access allow MSActivate02
http_access allow MSActivate03
http_access allow MSActivate04
http_access allow MSActivate05
http_access allow MSEssent
http_access allow FPAdobeDownload
http_access allow FPAdobeDownload2
http_access allow Currency
http_access allow BBub_iPad
http_access allow Ammy_Admin
http_access allow TestCBR
http_access allow Apple_FaceTime
http_access allow Apple_FaceTime2
http_access allow Adobe
http_access allow HPBulletin
#http_access allow Rapida
#http_access allow localnet auth_apavlenko inSAMsUsers
http_access allow localnet POST
#http_access allow localnet InetUsersGroup
#http_access allow unbanusers
# And finally deny all other access to this proxy
http_access deny all
tcp_outgoing_address 111.222.333.100 pool1
tcp_outgoing_address 111.222.333.101 pool2
tcp_outgoing_address 111.222.333.102 pool3
tcp_outgoing_address 111.222.333.103 pool4
tcp_outgoing_address 111.222.333.104 pool5
tcp_outgoing_address 111.222.333.105 pool6
tcp_outgoing_address 111.222.333.106 pool7
tcp_outgoing_address 111.222.333.107 pool8
tcp_outgoing_address 111.222.333.108 pool9
tcp_outgoing_address 111.222.333.109
ignore_expect_100 on
# Squid normally listens to port 3128
http_port 192.168.1.190:3128
# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/squid/cache 100 16 256
cache_dir ufs /usr/local/squid2/cache 30000 16 256
#maximum_object_size 1024 KB
maximum_object_size 0 KB
maximum_object_size_in_memory 10 MB
access_log /usr/local/squid2/logs/access.log squid
cache_log /usr/local/squid2/logs/cache.log
cache_store_log none
logfile_rotate 60
debug_options ALL,1
# Leave coredumps in the first cache dir
coredump_dir /usr/local/squid2
# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
В конфигурации, когда строчка
Код: Выделить всё
#http_access allow localnet InetUsersGroup
До этого, пользователи привысившие трафик - не отключались, но за каждый мегабайт с них снимали деньги... нынче решили жить щедро.
Слезно прошу помощи, возможно, даже, за не большую компенсацию, надо что бы заработал "план"))