migrando squid 2.7 para squid3 [RESOLVIDO]

1. migrando squid 2.7 para squid3 [RESOLVIDO]

Eduardo Giullyanny Silva Rodrigues
edzero3

(usa Debian)

Enviado em 02/09/2014 - 22:23h

Boa noite amigos....

Lutei lutei com o squid2.7 para habilitar o bloqueio por arp, mas num rolou até quando estava contando estava 1200 squid e eu 0, então larguei ele e tirei ele do meu servido, mas quando fui usar o mesmo squid.conf o bixo pegou, eu resolvi a maioria, agora falta esses:

[....] Restarting Squid HTTP Proxy 3.x: squid32014/09/02 22:15:24| WARNING: the "Hs" formating code is deprecated use the ">Hs" instead
2014/09/02 22:15:24| WARNING: (B) '::/0' is a subnetwork of (A) '::/0'
2014/09/02 22:15:24| WARNING: because of this '::/0' is ignored to keep splay tree searching predictable
2014/09/02 22:15:24| WARNING: You should probably remove '::/0' from the ACL named 'all'

Ainda estou tentando resolvelos, mas estes são mais dificeis

Veja o meu squid.conf

# Configuracoes gerais
http_port 3128 transparent
visible_hostname FWFAI
hierarchy_stoplist cgi-bin?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 350 MB
maximum_object_size_in_memory 100 KB
maximum_object_size 15360 KB
minimum_object_size 0 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
cache_replacement_policy lru
memory_replacement_policy lru
logformat squid3 %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
access_log /var/log/squid3/access.log squid
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 3000 16 256
cache_access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_swap_log /var/spool/squid3/swap.log
cache_mgr ti.ita@fai.edu.br
error_directory /usr/share/squid3/errors/Portuguese
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320

# Definicao das ACLs
acl all src all # aqui estava assim antes de eu tentar resolver: 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 192.168.0.0/24
acl localnet src 192.168.1.0/24
acl SSL_ports port 443 563 # snews
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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 407 # msn
acl Safe_ports port 25 # smtp
acl Safe_ports port 110 # pop
acl purge method PURGE
acl CONNECT method CONNECT

# Downloads Bloqueados/Liberados e Palavras Bloqueadas
acl DownloadsLiberados url_regex -i "/etc/squid3/conf/downloads.allow"
acl DownloadsBloqueados url_regex -i "/etc/squid3/conf/downloads.deny"
acl PalavrasBloqueadas url_regex -i "/etc/squid3/conf/palavras.deny"

# Sites Bloqueados/Liberados
acl SitesLiberados url_regex -i "/etc/squid3/conf/sites.allow"
acl SitesBloqueados url_regex -i "/etc/squid3/conf/sites.deny"

# Grupos de Acesso
acl Diretoria src "/etc/squid3/conf/ip.diretoria"
acl Gerencia src "/etc/squid3/conf/ip.gerencia"
acl Funcionarios src "/etc/squid3/conf/ip.funcionarios"
acl Wifi arp "/etc/squid3/conf/ip.mac"

# Ativando as ACLs Padrao
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow localnet
http_access deny to_localhost

# Ativando as ACLs Personalizadas
http_access allow Diretoria
http_access allow SitesLiberados
http_access allow DownloadsLiberados
http_access deny DownloadsBloqueados
http_access allow Gerencia !SitesBloqueados
http_access deny PalavrasBloqueadas
http_access deny SitesBloqueados
http_access allow Funcionarios
http_access allow Wifi
http_access deny all


  


2. Re: migrando squid 2.7 para squid3 [RESOLVIDO]

Eduardo Giullyanny Silva Rodrigues
edzero3

(usa Debian)

Enviado em 03/09/2014 - 21:10h

consegui um negócio, mas num é o mesmo, mas resolve:

# Configuracoes gerais
http_port 3128 transparent
visible_hostname FWFAI
#Cache feito na memória RAM
cache_mem 64 MB
#Tamanho máximo dos arquivos que serão guardados no cache feito na memória RAM
maximum_object_size_in_memory 64 KB
#Tamanho máximo dos arquivos que serão guardados no cache de disco
maximum_object_size 512 MB
maximum_object_size 0 KB
#Porcentagem de uso que começará a descartar os arquivos mais antigos, até 95%
cache_swap_low 90
cache_swap_high 95
#Diretório dos arquivos do cache, com quantidade de espaço usada em MB, com 16 pastas e 256 subpastas
cache_dir ufs /var/spool/squid3 2048 16 256
#Diretório dos logs de acesso dos usuários da rede
cache_access_log /var/log/squid3/access.log
#Atualização do cache
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280

# Definicao das ACLs
acl all src
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 192.168.0.0/24
acl localnet src 192.168.1.0/24
acl SSL_ports port 443 563 # snews
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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 407 # msn
acl Safe_ports port 25 # smtp
acl Safe_ports port 110 # pop
acl purge method PURGE
acl CONNECT method CONNECT

# Downloads Bloqueados/Liberados e Palavras Bloqueadas
acl DownloadsLiberados url_regex -i "/etc/squid3/conf/downloads.allow"
acl DownloadsBloqueados url_regex -i "/etc/squid3/conf/downloads.deny"
acl PalavrasBloqueadas url_regex -i "/etc/squid3/conf/palavras.deny"

# Sites Bloqueados/Liberados
acl SitesLiberados url_regex -i "/etc/squid3/conf/sites.allow"
acl SitesBloqueados url_regex -i "/etc/squid3/conf/sites.deny"

# Grupos de Acesso
acl Diretoria src "/etc/squid3/conf/ip.diretoria"
acl Gerencia src "/etc/squid3/conf/ip.gerencia"
acl Funcionarios src "/etc/squid3/conf/ip.funcionarios"
acl MacA arp "/etc/squid3/conf/macA"
acl MacB arp "/etc/squid3/conf/macB"

# Ativando as ACLs Padrao
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow localnet
http_access deny to_localhost

# Ativando as ACLs Personalizadas
http_access allow Diretoria
http_access allow SitesLiberados
http_access allow DownloadsLiberados
http_access deny DownloadsBloqueados
http_access allow Gerencia !SitesBloqueados
http_access deny PalavrasBloqueadas
http_access deny SitesBloqueados
http_access allow Funcionarios
http_access allow MacA
http_access deny MacB
http_access deny all








Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts