Squid (squid.conf)
Depois que colocar esse arquivo, basta criar os arquivos dependentes dele (elitegroup, blacklista, graylista, whitelista) e rodar o Squid.
# PORTA QUE SERA USADA PELOS CLIENTES PARA ACESSAR O PROXY
http_port 8080
icp_port 0
# CONFIGURACOES DE ARQUIVOS CACHE - LOG - ESPACO EM DISCO
cache_mem 16 MB #Memória Ram utilizada pelo squid (cuidados pra não deixar
#seu servidor travado sem memória livre.
maximum_object_size 5072 KB
cache_dir ufs /var/spool/squid 500 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
emulate_httpd_log off
connect_timeout 120 seconds
#ACL PARA AUTENTICACAO
#acl logname proxy_auth REQUIRED
#ACLS COM RESTRICOES POR HORARIO
acl manha time 00:01-8:30
acl almoco time 11:30-13:30
acl noite time 18:00-23:59
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 444 447 563 7443
#PORTAS QUE O PROXY USA
acl Safe_ports port 80 21 25 110 443 444 447 563 70 210 7443 8080 1024-65535
acl CONNECT method CONNECT
#ENDERECO DA REDE E MASCARA DE SUBREDE
acl all src 192.168.113.0/255.255.255.0
#BLOQUEIOS E LIBERACOES POR PALAVRAS DE UM LISTA
acl blacklista url_regex -i "/etc/squid/blacklista" # palavras (site) bloqueados permanentemente
acl graylista url_regex -i "/etc/squid/graylista" # sites liberados nos horários definidos pelas acls manha, almoco e noite
acl whitelista url_regex -i "/etc/squid/whitelista" #palavra liberadas permanentemente (necessário para palavras que tenham uma parte na blacklista, ex.
#dePUTAdo, tem que constar na whitelista, pq a palavra [*****] ta na blacklista)
#BLOQUEIO DE DOWNLOADS
acl download url_regex -i .com$ .pif$ .exe$ .avi$ .mp3$ .mpeg$ .mpg$ .rm$ .wma$ .wmv$ .asx$ .cab$ .src$
#MAQUINAS COM ACESSO LIBERADO
acl elite src "/etc/squid/elitegrup
#MAQUINASCOM ACESSO PROIBIDO
acl block src "/etc/squid/no_net"
#BLOQUEIOS E LIBERACOES EFETIVAS
#LIBERANDO ACESSO NO HORARIO DE ALMOCO, MANHA E NOITE
http_access allow manager localhost
#LIBERANDO ACESSO DO GRUPO ELITE
http_access allow elite
http_access allow whitelista
#BLOQUEANDO GRAYLISTA E JOGOS NO HORARIO DE EXPEDIENTE
http_access deny manager
http_access deny block
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#BLOQUEANDO DOWNLOADS E RADIOS
http_access deny download
http_access deny blacklista
http_access deny graylista !manha !almoco !noite
#LIBERANDO ACESSO PARA IPS
http_access allow all
icp_access allow all
miss_access allow all
cache_mgr root@[seu servidor]
#cache_effective_user nobody
#cache_effective_group nobody
visible_hostname root.[seu servidor]
store_avg_object_size 4 KB