- Código: Selecionar todos
#######################################################################################
# Declaração das variáveis - Altere aqui caso algum path seja diferente #
#######################################################################################
#Diretório para conteúdos do SCA
SCA_CONTENTDIR="/partition/SquidCacheAux"
#Nome do diretório para o cache do SCA
SCA_CACHEDIRNAME="cache"
#Caminho completo do cache - NÃO ALTERE !!!
SCA_TEST_STRUCTURE=$SCA_CONTENTDIR"/"$SCA_CACHEDIRNAME
#Path completo do Log do SCA - NÃO ALTERE !!!
SCA_LOGFILE=$SCA_CONTENTDIR"/log"
#Path completo do binário do Lighttpd
LIGHTTPD="/usr/sbin/lighttpd"
#Path completo do binário do Httpd
HTTPD="/usr/sbin/thttpd"
#Path completo do binário do Perl
PERL="/usr/local/bin/perl"
#Path completo do binário do Squid
SQUID="/usr/sbin/squid"
#Diretório ETC do Squid
ETC_SQUID="/usr/local/squid/etc"
#Path completo do squid.conf - ALTERE SOMENTE A VARIÁVEL ACIMA
SQUID_CONFFILE=$ETC_SQUID"/squid.conf"
#######################################################################################
#######################################################################################
# Configurações do SquidCacheAux #
#######################################################################################
SQUIDCACHEAUX_ENABLE="1"
SQUIDCACHEAUX_CACHECHECK="1"
SQUIDCACHEAUX_HOUR="00"
SQUIDCACHEAUX_MINUTE="00"
SQUIDCACHEAUX_CACHECLEAR="0"
SQUIDCACHEAUX_CACHEMAXSIZE="512000"
SQUIDCACHEAUX_LOGCLEAR="0"
SQUIDCACHEAUX_LOGCLEARACTION="1"
SQUIDCACHEAUX_LOGMAXSIZE="10240"
SQUIDCACHEAUX_WINUPDATE="5"
SQUIDCACHEAUX_YOUTUBE="5"
- Código: Selecionar todos
http_port 3120 transparent
icp_port 0
#SquidCacheAux ACL start
acl store_rewrite_list urlpath_regex \/(get_video\?|videodownload\?|videoplayback.*id)
acl store_rewrite_list_orkut dstdomain .orkut.com .orkut.com.br
cache allow store_rewrite_list_orkut
acl QUERY2 urlpath_regex get_video\? videoplayback\? videodownload\?
cache allow QUERY2
acl youtube dstdomain .youtube.com
cache allow youtube
#SquidCacheAux ACL end
acl video_cache dstdomain -i "/usr/local/squid/etc/cache.flt"
cache allow video_cache
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
acl ADSAdClien url_regex ADSAdClien
http_access deny ADSAdClien
deny_info http://www.alfaconect.net/msn.swf ADSAdClien
cache_mem 512 MB
maximum_object_size 51200 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 64 KB
cache_dir diskd /partition/squid/cache 5000 16 256 Q1=72 Q2=64
access_log /partition/squid/logs/access.log
cache_log /partition/squid/logs/cache.log
cache_store_log none
cache_effective_user nobody
cache_effective_group nogroup
pid_filename /var/run/squid.pid
half_closed_clients off
memory_pools off
#cache_swap_low 70
#cache_swap_high 90
#SquidCacheAux URL_REWRITE start
url_rewrite_program /etc/SquidCacheAux/redir.pl
url_rewrite_children 5
#SquidCacheAux URL_REWRITE end
#SquidCacheAux refresh_pattern start
# 1 year = 525600 mins, 1 month = 43800 mins
refresh_pattern imeem.*\.flv 0 0% 0 override-lastmod override-expire
refresh_pattern \.rapidshare.*\/[0-9]*\/.*\/[^\/]* 161280 90% 161280 ignore-reload
refresh_pattern orkut.com/.* 10080 100% 43200 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern (get_video\?|videoplayback\?|videodownload\?) 5259487 99999999% 5259487 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern (get_video\?|videoplayback\?id|videoplayback.*id|videodownload\?|\.flv?) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id||videodownload\?|\.flv?) 129600 999999% 129600 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern \.(ico|video-stats) 129600 999999% 129600 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth override-lastmod negative-ttl=10080
refresh_pattern \.etology\? 129600 999999% 129600 override-expire ignore-reload ignore-no-cache
refresh_pattern galleries\.video(\?|sz) 129600 999999% 129600 override-expire ignore-reload ignore-no-cache
refresh_pattern brazzers\? 129600 999999% 129600 override-expire ignore-reload ignore-no-cache
refresh_pattern \.adtology\? 129600 999999% 129600 override-expire ignore-reload ignore-no-cache
refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 129600 20% 129600 ignore-no-cache ignore-private override-expire ignore-reload ignore-auth negative-ttl=40320 max-stale=10
refresh_pattern ^.*safebrowsing.*google 129600 999999% 129600 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth negative-ttl=10080
refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.uk) 129600 999999% 129600 override-expire ignore-reload ignore-private negative-ttl=10080
refresh_pattern ytimg\.com.*\.jpg 129600 999999% 129600 override-expire ignore-reload
refresh_pattern images\.friendster\.com.*\.(png|gif) 129600 999999% 129600 override-expire ignore-reload
refresh_pattern garena\.com 129600 999999% 129600 override-expire reload-into-ims
refresh_pattern photobucket.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 129600 999999% 129600 override-expire ignore-reload
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 129600 999999% 129600 ignore-no-cache override-expire override-lastmod
refresh_pattern mediafire.com\/images.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png) 129600 999999% 129600 reload-into-ims override-expire ignore-private
refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\. 129600 999999% 129600 reload-into-ims ignore-no-cache ignore-reload override-expire
refresh_pattern ^http:\/\/www.onemanga.com.*\/ 129600 999999% 129600 reload-into-ims ignore-no-cache ignore-reload override-expire
#SquidCacheAux refresh_pattern end
refresh_pattern -i ^http://.*\.(css|htm|html|ico|js|jsp|xml)$ 1440 80% 999999
refresh_pattern -i ^http://.*\.(bmp|gif|jpeg|jpg|png)$ 1440 80% 999999 ignore-reload
refresh_pattern -i ^http://.*\(ace|adt|arj|asf|avi|bin|bz2|bzip|cab|dat|dll|doc|dot|exe|fla|flv|gz|iso|lha|log|lzh|mdb|mid|mov|mp3|mpeg|mpg|msi|mso|ogg|pps|ppt|rar|rm|rtf|shs|src|sys|swf|tgz|tif|ttf|wav|wma|wri|wmv|vpu|vpaa|vqf|vob|zip)$ 43200 100% 999999 ignore-reload
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 sqstat src 10.20.30.250/255.255.255.255
#acl to_localhost dst 127.0.0.1/32
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 8180
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
#Access deny to Squid ident. header
#header_access Via deny all
#header_access X-Forwarded-For deny all
#header_access Proxy-Connection deny all
#header_access Accept-Encoding deny all
#Restrição
acl malware_block_list url_regex -i "/usr/local/squid/etc/malware_block_list.txt"
acl ipsblock src "/usr/local/squid/etc/ips.txt"
acl extensoes urlpath_regex -i "/usr/local/squid/etc/ext.txt"
acl sites url_regex "/usr/local/squid/etc/sites.txt"
acl h_manha time MTWHF 06:00-12:00
acl h_tarde time MTWHF 13:00-19:15
http_access deny ipsblock sites h_manha
http_access deny ipsblock sites h_tarde
http_access deny ipsblock extensoes h_manha
http_access deny ipsblock extensoes h_tarde
http_access deny malware_block_list
deny_info http://malware.hiperlinks.com.br/denied.shtml malware_block_list
### Zero Penalty Hits ###
server_persistent_connections off
zph_mode tos
zph_local 0x30
acl filterneg dstdom_regex "/usr/local/squid/etc/filter.flt"
acl internal_net src "/usr/local/squid/etc/ipaccess.yes"
acl no_proxy dstdom_regex -i "/usr/local/squid/etc/ipaccess.no"
#Access deny to Squid ident. header
header_access Via deny all
header_access X-Forwarded-For deny all
header_access Proxy-Connection deny all
header_access Accept-Encoding deny all
always_direct allow no_proxy
http_access deny filterneg
http_access allow internal_net
http_access deny all
#http_reply_access allow all
#icp_access allow all
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
visible_hostname serv1
coredump_dir /partition/squid/cache
error_directory /usr/local/squid/share/errors/English
#SquidCacheAux STOREURL start
storeurl_access allow store_rewrite_list
storeurl_access allow store_rewrite_list_orkut
storeurl_access deny all
storeurl_rewrite_program /etc/SquidCacheAux/storeurl.pl
storeurl_rewrite_children 5
storeurl_rewrite_concurrency 5
#SquidCacheAux STOREURL end
- Código: Selecionar todos
INETTYPE='ETHERNET_STATIC'
DNS1='8.8.8.8'
DNS2='8.8.4.4'
DOMAINNAME='inetw'
HOSTNAME='serv1'
LOCAL_IPADDR='10.20.30.250'
LOCAL_IPADDR2='10.20.30.5'
LOCAL_NETMASK='255.255.255.252'
LOCAL_NETMASK2='255.255.255.0'
IPADDR='10.15.11.2'
IPADDR2='120.10.0.100'
NETMASK='255.255.255.252'
NETMASK2='255.255.255.0'
GATEWAY='10.15.11.1'
DHCPSERVER='YES'
DHCPD_START_IP='10.20.30.250'
DHCPD_END_IP='10.20.30.250'
ADMIN_AUTH='xxxxxxxxxxxxxxxxxxxx'
IF_LOCAL='eth0'
IF_INET='eth1'
TZ='EST3'
TIMESERVER='time-b.nist.gov'
USE_DNS_CACHE='YES'
ENABLE_CRON='YES'
ENABLE_EXTERNAL_PING='NO'
ENABLE_EXTERNAL_SSH='YES'
ENABLE_WEBADMIN='YES'
WEBADMIN_PORT='8180'
SSH_PORT='22'
QOS_TYPE='SUBNET'
QOS_UPSTREAM='2048'
QOS_DOWNSTREAM='2048'
QOS_FUP_BURST='8'
QOS_NUP_BURST='4'
QOS_SUP_BURST='2'
QOS_FDOWN_BURST='16'
QOS_NDOWN_BURST='8'
QOS_SDOWN_BURST='4'
QOS_DOWNSTREAM_JUNK='15'
QOS_UPSTREAM_JUNK='15'
QOS_UPFW_STREAM='10'
QOS_HIGH_PRI_PER='50'
QOS_NORM_PRI_PER='35'
QOS_SLOW_PRI_PER='15'
DEFAULT_USERS_FILTER='BLOCK_ALL'
DEFAULT_SERVICES_FILTER='BLOCK_ALL'
LANGUAGE_WEBADMIN='BRZ'
QOS_ZPH='8192'
RRD_ENABLED='1'
RRD_HTTP_PORT='8001'
RRD_MAX_DOWNSTREAM='1024'
RRD_MAX_UPSTREAM='1024'
RRD_INOUT_DEVICE='eth1'
RRD_INOUT_UPDATEINTERVAL='60'
RRD_LQ_UPDATEINTERVAL='60'
RRD_LQ_GATEWAY='127.0.0.1'
RRD_QOS_ENABLED='2'
RRD_QOS_UPDATEINTERVAL='60'
RRD_LOCATE='0'
SQUID_ENABLE='1'
SQUID_PORT='3120'
SQUID_PROXY_TYPE='1'
SQUID_POLICY='ALL'
SQUID_DISK_CACHE_ENABLE='1'
SQUID_DISK_CACHE_SIZE='5000'
SQUID_MEM_CACHE_SIZE='512'
SQUID_MAX_OBJ_SIZE='51200'
SQUID_MIN_OBJ_SIZE='0'
MAXCONN='0'
SQUID_LOG_ACCESS='1'
ERROR_LINGUAGE='English'
SQUID_URLB_ENABLE='1'
SQUID_WRDB_ENABLE='0'
SQUID_EWRD_ENABLE='0'
SQUID_EXTB_ENABLE='0'
SQUID_CACHE_ENABLE='1'
SQUID_PRIV_USER='0'
SQUID_NO_CONF='0'