Soul_Keeper
(usa Ubuntu)
Enviado em 18/05/2010 - 10:07h
Meu squid estava funcionando perfeitamente quando percebi por esses dias que
não estava aplicando o bloqueio por palavras.
Não consegui até agora descobrir o ocorrido mas ja estou prestes a formatar o servidor...
##SQUID BY RAFAEL RAMON##
http_port 3128 transparent
##CACHE CONFIG##
cache_mem 720 MB
maximum_object_size 1024 MB
maximum_object_size_in_memory 128 KB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 60000 16 256
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
##CACHE WINDOWS UPDATE##
refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern
www.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
refresh_pattern download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
refresh_pattern update.microsoft.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_mgr rafael@transoeste.com.br
dns_nameservers 201.10.128.2 201.10.120.3
acl all src
acl transoeste src 192.168.1.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 873
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 873 # 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
acl purge method PURGE
acl CONNECT method CONNECT
acl palavrasb url_regex "/etc/squid3/palavrasb"
acl sites url_regex -i "/etc/squid3/sites"
acl ipliberado src "/etc/squid3/ipliberado"
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 ipliberado
http_access allow sites
http_access deny palavrasb
http_access allow transoeste
http_access allow localhost
http_access deny all
cache_mgr Rafael_Ramon
visible_hostname SQUID_TRANSOESTE
deny_info
http://www.transoeste.com.br/deny.html palavrasb bloqued
http_access deny all
error_directory /usr/share/squid3/errors/pt-br
IPTABLES
#!bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -s 0/0 -m tcp -p tcp -i eth1 --dport 5900 -j DNAT --to-destination 10.0.0.2
iptables -t nat -A PREROUTING -i eth0 -s 0/0 -d 200.201.174.207 -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -s 200.201.174.207 -d 0/0 -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -s 0/0 -d 200.201.174.204 -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i eth0 -s 200.201.174.204 -d 0/0 -p tcp --dport 80 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -t nat -A PREROUTING -s eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
exit
Algum erro na minha cara que não achei!????