Osennij_Lis
Junior Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору # ------------------------ # ------ SQUID.CONF ------ # ------------------------ # ------------------------ # ---- ACCESS CONTROLS --- # ------------------------ # ---- LOCAL NETWORK ----- acl localnet src 192.168.0.0/18 # ---- P O R T S LIST --- # ports for method CONNECT acl SSL_ports port 443 acl SSL_ports port 490 acl SSL_ports port 2083 acl SSL_ports port 5000 acl SSL_ports port 8443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 211 # Registr 6s (ONKO) acl Safe_ports port 443 # https acl Safe_ports port 1236 # ATC acl Safe_ports port 1344 # icap acl Safe_ports port 4209 # http://46.61.230.73:4209/Register/Register/Integration/AddFromEmias? acl Safe_ports port 1935 # X3 acl Safe_ports port 4210 # X3 acl Safe_ports port 4211 # http://46.61.230.119:4211/hosp/ acl Safe_ports port 4211 # http://81.200.80.48:60080/ acl Safe_ports port 5000 # Synology acl Safe_ports port 5190 #ip-tel acl Safe_ports port 10000-20000 #IP-tel acl Safe_ports port 58080 # http://zdravmo.ru 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 9443 # Sberbank acl CONNECT method CONNECT #dns_nameservers 8.8.8.8 dns_nameservers 192.168.0.150 192.168.10.150 http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost manager http_access deny manager http_access allow localhost # ------------------------ # ---- NETWORK OPTIONS --- # ------------------------ http_port 192.168.60.20:3127 intercept options=NO_SSLv3:NO_SSLv2 http_port 192.168.60.20:3128 options=NO_SSLv3:NO_SSLv2 https_port 192.168.60.20:3129 intercept ssl-bump options=ALL:NO_SSLv3:NO_SSLv2 connection-auth=off cert=/etc/squid/squidCA.pem always_direct allow all sslproxy_cert_error allow all sslproxy_flags DONT_VERIFY_PEER #---- FITERS (BEGIN) ------ #Заблокированные https ресурсы acl blocked ssl::server_name "/etc/squid/filter_https_url.txt" #Заблокированные url acl filter_url url_regex "/etc/squid/filter_url.txt" #Список сайтов, на которые разрешён доступ группам limited_http acl filter_limited_http url_regex -i "/etc/squid/filter_limited_http.txt" #Блокировка левых http-прокси acl filter_free_proxy url_regex -i "/etc/squid/filter_free_proxy.txt" #Разрешённые геморройные сайты (открываются без проверок на аудио, видео и расширения) acl filter_gemor_sites url_regex -i "/etc/squid/filter_gemor_sites.txt" #аудио и видео acl filter_audio rep_mime_type -i ^audio/ acl filter_video rep_mime_type -i ^video/ #acl filter_media_extention urlpath_regex -i "/etc/squid3/filter_media_extention.txt" #макромедиа флэш acl filter_flash rep_mime_type -i ^application/x-shockwave-flash #acl fails rep_mime_type ^.*mms.* #acl fails rep_mime_type ^.*ms-hdr.* #acl fails rep_mime_type ^.*x-fcs.* #acl fails rep_mime_type ^.*x-ms-asf.* acl fails2 urlpath_regex dvrplayer mediastream mms:// acl fails2 urlpath_regex \.asf$ \.afx$ \.flv$ \.swf$ acl deny_rep_mime_flashvideo rep_mime_type -i video/flv acl deny_rep_mime_shockwave rep_mime_type -i ^application/x-shockwave-flash$ acl x-type req_mime_type -i ^application/octet-stream$ acl x-type req_mime_type -i application/octet-stream acl x-type req_mime_type -i ^application/x-mplayer2$ acl x-type req_mime_type -i application/x-mplayer2 acl x-type req_mime_type -i ^application/x-oleobject$ acl x-type req_mime_type -i application/x-oleobject acl x-type req_mime_type -i application/x-pncmd acl x-type req_mime_type -i ^video/x-ms-asf$ acl x-type2 rep_mime_type -i ^application/octet-stream$ acl x-type2 rep_mime_type -i application/octet-stream acl x-type2 rep_mime_type -i ^application/x-mplayer2$ acl x-type2 rep_mime_type -i application/x-mplayer2 acl x-type2 rep_mime_type -i ^application/x-oleobject$ acl x-type2 rep_mime_type -i application/x-oleobject acl x-type2 rep_mime_type -i application/x-pncmd acl x-type2 rep_mime_type -i ^video/x-ms-asf$ #разрешённая и запрещённая почта acl filter_mail_white url_regex -i "/etc/squid/filter_mail_white.txt" acl filter_mail_black url_regex -i "/etc/squid/filter_mail_black.txt" #---- REDIRECT RULES BEGIN --- #Emias acl kgbemias src 192.168.88.0/23 192.168.90.0/23 192.168.100.0/24 192.168.110.0/24 192.168.114.0/23 192.168.11.0/24 acl emiaskgb dstdomain emias.mosreg.ru 46.61.230.73 http_access deny kgbemias emiaskgb deny_info http://192.168.9.150/mis emiaskgb #Bars acl kgbbars src 192.168.88.0/23 192.168.90.0/23 192.168.100.0/24 192.168.110.0/24 192.168.114.0/23 192.168.11.0/24 acl barskgb dstdomain minzdravmo.iorchestra.ru 46.61.208.77 http_access deny kgbbars barskgb deny_info http://bars.miacmo.ru/ria barskgb #---- REDIRECT RULES END ------- # ------------------------------ # ---- TRANSPARENT SETTINGS ---- # ------------------------------ #----------- IP group (BEGIN) ---------------------------------------------------- #Список ip кому разрешено ходить без авторизации acl our_networks src "/etc/squid/ip_our_networks.txt" #Список ip для доступа к геморным сайтам acl ip_gemor_sites src "/etc/squid/ip_gemor_sites.txt" #ip разрешено всё (за исключением неперечисленных портов) acl ip_allow_all src "/etc/squid/ip_allow_all.txt" #Группа юзеров (IP) кому запретить http acl ip_deny_http src "/etc/squid/ip_deny_http.txt" #Список ip кому разрешено аудио и видео acl ip_audiovideo_allow src "/etc/squid/ip_audiovideo_allow.txt" #Список ip кому запрещен флэш acl ip_flash_deny src "/etc/squid/ip_flash_deny.txt" #ip кому разрешена почта acl ip_mail_allow src "/etc/squid/ip_mail_allow.txt" #ip разрешены заблокированные url acl ip_url_allow src "/etc/squid/ip_url_allow.txt" #Список ip кому разрешено ходить только на разрешённые сайты acl ip_limited_http src "/etc/squid/ip_limited_http.txt" #----------- IP group (END) ---------------------------------------------------- #----------- IP group access (BEGIN) ------------------------------------------- #разрешить группе ip_limited_http доступ только к некоторым сайтам из фильтра filter_limited_http.txt http_access allow ip_limited_http our_networks filter_limited_http http_access deny ip_limited_http our_networks all #разрешить всё группе ip_allow_all http_access allow ip_allow_all our_networks http_reply_access allow ip_allow_all our_networks #открывать геморные сайты без проверок no_cache deny our_networks filter_gemor_sites http_access allow our_networks filter_gemor_sites #Блок настроек посвященный фильтрации https acl step1 at_step SslBump1 ssl_bump peek step1 ssl_bump terminate blocked !ip_allow_all ssl_bump splice all sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB #Audio & Video #http_access deny !ip_audiovideo_allow our_networks filter_media_extention http_reply_access deny !ip_audiovideo_allow our_networks filter_audio http_reply_access deny !ip_audiovideo_allow our_networks filter_video #Macromedia Flash DENY http_reply_access deny ip_flash_deny our_networks filter_flash #mail http_access allow our_networks filter_mail_white http_access deny !ip_mail_allow our_networks filter_mail_black #блокировка по урл, к прокси и по расширению всех, кроме перечисленных в ip_url_allow http_access deny !ip_url_allow our_networks filter_url http_access deny !ip_url_allow our_networks filter_free_proxy # http http_access deny ip_deny_http http_reply_access deny ip_deny_http #Группе our_networks разрешается все, что не запрещенно фильтрами выше http_access allow our_networks http_reply_access allow our_networks #------------------------ #---- NTLM group ACL ---- #------------------------ auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp --domain=GB1 auth_param ntlm children 100 startup=20 idle=5 auth_param ntlm keep_alive on external_acl_type Ad_Check %LOGIN /lib/squid/ext_wbinfo_group_acl #Проверка принадлежности к AD acl nt_group proxy_auth REQUIRED acl AD_Users external Ad_Check "/etc/squid/ntlm_cfg/AD_Users.txt" acl ntlm_allow_all external Ad_Check ntlm_allow_all acl ntlm_allow_audio_video external Ad_Check ntlm_allow_audio_video acl ntlm_allow_mail external Ad_Check ntlm_allow_mail acl ntlm_allow_url external Ad_Check ntlm_allow_url acl ntlm_deny_flash external Ad_Check ntlm_deny_flash acl ntlm_deny_http external Ad_Check ntlm_deny_http acl ntlm_allow_limited_http external Ad_Check ntlm_allow_limited_http acl ntlm_common external Ad_Check ntlm_common #---- NTLM group access (BEGIN) ---- #разрешить группе ntlm_allow_limited_http доступ только к некоторым сайтам из фильтра filter_limited_http.txt http_access allow ntlm_allow_limited_http ntlm_common filter_limited_http http_access deny ntlm_allow_limited_http ntlm_common all #разрешить всё группе ntlm_allow_all http_access allow ntlm_allow_all ntlm_common http_reply_access allow ntlm_allow_all ntlm_common #открывать геморные сайты без проверок http_access allow ntlm_common filter_gemor_sites # Audio & Video #http_access deny !ntlm_allow_audio_video ntlm_common filter_media_extention http_reply_access deny !ntlm_allow_audio_video ntlm_common filter_audio http_reply_access deny !ntlm_allow_audio_video ntlm_common filter_video #mail http_access allow ntlm_common filter_mail_white http_access deny !ntlm_allow_mail ntlm_common filter_mail_black #Macromedia Мультимедиа контент (Flsh,flv... ) DENY http_reply_access deny ntlm_deny_flash ntlm_common filter_flash http_reply_access deny ntlm_deny_flash deny_rep_mime_flashvideo http_reply_access deny ntlm_deny_flash deny_rep_mime_shockwave http_access deny ntlm_deny_flash fails2 http_reply_access deny ntlm_deny_flash fails2 http_access deny ntlm_deny_flash x-type http_reply_access deny ntlm_deny_flash x-type http_access deny ntlm_deny_flash x-type2 http_reply_access deny ntlm_deny_flash x-type2 #блокировка по урл, к прокси и по расширению всех, кроме перечисленных в ntlm_url_allow http_access deny !ntlm_allow_url ntlm_common filter_url #http_access deny !ntlm_allow_url ntlm_common filter_free_proxy #запретить http #http_access deny AD_Users http_access deny ntlm_deny_http ntlm_common all http_reply_access deny ntlm_deny_http ntlm_common all http_access allow ntlm_common http_reply_access allow ntlm_common #Запретить http и разрешить icp http_access deny all icp_access allow all # --------------------- # ---- ADM OPTIONS ---- # --------------------- coredump_dir /var/spool/squid 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 cache_dir ufs /var/spool/squid 4096 16 256 maximum_object_size 8192 KB minimum_object_size 2 KB #cache_dir aufs /var/spool/squid 20000 49 256 #maximum_object_size 61440 KB #minimum_object_size 3 KB cache_swap_low 90 cache_swap_high 95 maximum_object_size_in_memory 512 KB memory_replacement_policy lru logfile_rotate 4 #---- SQUIDCLAMAV ---- icap_enable on icap_send_client_ip on icap_send_client_username on icap_client_username_encode off icap_client_username_header X-Authenticated-User icap_preview_enable on icap_preview_size 1024 icap_service service_req reqmod_precache bypass=0 icap://127.0.0.1:1344/squidclamav icap_service service_resp respmod_precache bypass=0 icap://127.0.0.1:1344/squidclamav adaptation_access service_req allow all adaptation_access service_resp allow all |