squid.conf

1. squid.conf

Danilo de Oliveira
noob185

(usa Slackware)

Enviado em 02/04/2008 - 14:02h

Boa Tarde,

Galera tenho algumas dúvidas eu uso o slackware 11 e está rodando meu server samba nele tenho essa máquina só para testar e resolvi fazer testes com o squid então peguei um conf aqui no VOL mesmo,instalei o squid 2.6, configurei o squid.conf, coloquei mais uma placa de rede para conexão virtua.
Bom a dúvida é:

1- Como faço para dar um start no squid? coloca-lo em serviço.

2- Em qual arquivo configuro o virtua pois meu virtua é IP fixo ?

3- Tem algum problema eu deixa essa maquina com o samba e squid?

4- Está faltando alguma coisa para o funcionamento?

Segue abaixo meu squid.conf


################################################
##### Porta, Nome e Cache #####
################################################
#
http_port 5005
visible_hostname TESTE
#
cache_mem 150 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 256 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
#
################################################
##### Log #####
################################################
#
cache_access_log /var/log/squid/access.log
cache_store_log /var/log/squid/store.log
cache_log /var/squid/logs/cache.log
cache_dir ufs /var/spool/squid 20000 16 256
#
################################################
##### ACLs #####
################################################
#
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 SSL_ports port port 443 563
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 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 901 # swat
acl Safe_ports port 1025-65535 # portas altas
acl purge method PURGE
acl CONNECT method CONNECT

################################################
##### Direitos de Acessos #####
################################################
#
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
#
################################################
## USANDO NCSA_AUTH ##
################################################
#
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
auth_param basic realm Servidor Proxy de Internet João Paulo. Entre com seu usuário e Senha.
#auth_param basic children 5
#
################################################
## AUTENTICAÇÃO ##
################################################
#
acl autenticados proxy_auth REQUIRED
#
################################################
## BLOQUEAR PALAVRAS ##
################################################
#
acl acesso_full proxy_auth "/etc/squid/acessos/acesso_full"
acl bloquear_palavras url_regex -i "/etc/squid/bloqueios/bloquear_palavras"
deny_info http://www.vivaolinux.com.br/~jpaulo_farias bloquear_palavras
#
################################################
## BLOQUEIA O MESSENGER ##
################################################
#
acl bloquear_msn dstdomain "/etc/squid/bloqueios/bloquear_msn"
acl acesso_msn proxy_auth "/etc/squid/acessos/acesso_msn"
http_access allow acesso_msn bloquear_msn
http_access deny bloquear_msn
deny_info http://www.vivaolinux.com.br/~jpaulo_farias bloquear_msn
#
################################################
## BLOQUEIA ORKUT ##
################################################
#
acl bloquear_orkut url_regex -i "/etc/squid/bloqueios/bloquear_orkut"
acl acesso_orkut proxy_auth "/etc/squid/acessos/acesso_orkut"
http_access allow acesso_orkut bloquear_orkut
http_access deny bloquear_orkut
deny_info http://www.vivaolinux.com.br/~jpaulo_farias bloquear_orkut
#
################################################




Muito obrigado pela atenção !









  


2. Re: squid.conf

Marcos Miras
marcosmiras

(usa CentOS)

Enviado em 02/04/2008 - 14:31h

Para rodar o squid digite
# squid start
E verifique se ocorre algum erro ou se ele inicia normalmente.
Para habilitar a placa virtual você pode usar o ifconfig, exemplo:
# ifconfig eth1:0 200.xxx.xxx.xxx 255.xxx.xxx.xxx up
E não há problemas em deixar os dois serviços no mesmo host.

Abraço!


3. erro

Danilo de Oliveira
noob185

(usa Slackware)

Enviado em 02/04/2008 - 14:40h

Obrigadao cara, olha o erro que deu! =/


# squid start
WARNING: Cannot write log file: /usr/local//var/logs/cache.log
/usr/local//var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.



4. Re: squid.conf

Marcos Miras
marcosmiras

(usa CentOS)

Enviado em 02/04/2008 - 14:50h

Execute:
# squid -Z


5. erro

Danilo de Oliveira
noob185

(usa Slackware)

Enviado em 02/04/2008 - 15:07h

Marcos cara olha uq deu dei
squid -z
squid -Z
squid -z /usr/local/var/logs/cache.log

deu isso

squid -z /usr/local/var/logs/cache.log
WARNING: Cannot write log file: /usr/local//var/logs/cache.log
/usr/local//var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2008/04/02 15:14:45| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local//var/cache: (13) Permission denied
Squid Cache (Version 3.0.STABLE4): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.000 user + 0.010 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 519




6. Re: squid.conf

Marcos Miras
marcosmiras

(usa CentOS)

Enviado em 02/04/2008 - 15:11h

Você está logado como root?


7. erro

Danilo de Oliveira
noob185

(usa Slackware)

Enviado em 02/04/2008 - 15:34h

Estou cara sera que eh por causa disso aki!





################################################
##### Log #####
################################################
#
cache_access_log /var/log/squid/access.log
cache_store_log /var/log/squid/store.log
cache_log /var/squid/logs/cache.log
cache_dir ufs /var/spool/squid 20000 16 256



meu squid ta instalado #/usr/local/squid/etc/squid.conf


8. Re: squid.conf

César...
cesar

(usa CentOS)

Enviado em 02/04/2008 - 15:59h

Acho que o problema está no diretório!

"Acho".


9. erro

Danilo de Oliveira
noob185

(usa Slackware)

Enviado em 02/04/2008 - 17:26h

da dando esse agora ta ficando bom

2008/04/02 17:33:19| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2008/04/02 17:33:19| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2008/04/02 17:33:19| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
2008/04/02 17:33:19| Can't use proxy auth because no authentication schemes are fully configured.
FATAL: ERROR: Invalid ACL: acl password proxy_auth REQUIRED

Squid Cache (Version 3.0.STABLE4): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 496



10. Erro no password

Alex Douglas
adsjcsp

(usa Debian)

Enviado em 02/04/2008 - 17:51h

Você deve dizer ao squid se o password irá ser ALLOW (Liberado) ou DENY(Negado) correto?

tenta assim:

http_access allow password e vê se ocorrerá algum erro. T+






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts