cream3
(usa Outra)
Enviado em 26/01/2011 - 17:02h
pessoal segue meu squid.conf
parece que ele começou a querer funcionar e parou.
No log access, me apareceu duas paginas de teste, mas, o teste sendo feito dentro do proprio servidor.
no log cache, não me mostra nenhuma estatistica sendo processada.
postar o codigo:
http_port 3177 transparent
acl manager proto cache_object
acl localteste src 10.31.20.84/32
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https
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 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
#Allow ICP queries from local networks only
icp_access allow localnet
icp_access deny all
icp_access allow localteste
# For example,
#
# # proxy icp
# # hostname type port port options
# # -------------------- -------- ----- ----- -----------
cache_peer 10.31.20.253 parent 3177 0 proxy-only default
# cache_peer sib1.foo.net sibling 3128 3130 proxy-only
# cache_peer sib2.foo.net sibling 3128 3130 proxy-only
#
cache_peer_access 10.31.20.253 allow all
cache_dir ufs /home/seminmg/squid 140000 10 1000
maximum_object_size 102400 KB
#########################################################################################
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Package(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
refresh_pattern -i^http://.*\.(css|htm|html|ico|js|jsp|xml)$ 1440 80% 20000
refresh_pattern -i^http://.*\.(bmp|gif|jpeg|jpg|png)$ 1440 80% 20000
refresh_pattern -ittp://.*\.(ace|adt|arj|asf|avi|bin|bz2|bzip|cab|dat|dll|doc|dot|exe|fla|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% 20000
#refresh_pattern -i\.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
#acl youtube dstdomain .youtube.com
#cache allow youtube
#########################################################################################
Para colocar transparente fiz:
# iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to- port 3177
////////////////////////////////////////////////////////////////////////