Wednesday, May 13, 2009

squid Transparent server configuration (Old using http_accel)

http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
#--
no_cache deny QUERY
cache_mem 100 MB
#--------
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
#--
dns_nameservers 192.168.1.7 202.56.250.5 202.56.230.6
#---------
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 to_localhost dst 127.0.0.0/8
acl SSL_ports 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 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 CONNECT method CONNECT
#---------- Full Acces Define--
acl admin src 192.168.1.99 192.168.1.12 192.168.1.75 192.168.1.76 192.168.1.124 192.168.1.129
http_access allow admin
acl murahari src 192.168.1.145
#------------------------------------------

acl download urlpath_regex "/etc/squid/blocks.files.acl"
acl local src 192.168.1.0/255.255.255.0
#acl local2 src 192.168.0.0/255.255.255.0

http_access deny download
deny_info ERR_BLOCKED_FILES download

#########--------------------- Blocking URLS ---------
acl valid_sites url_regex "/etc/squid/valid_sites.txt"
http_access allow valid_sites

acl music_domains url_regex "/etc/squid/block/music/domains"
acl music_urls url_regex "/etc/squid/block/music/urls"
acl movies_domains url_regex "/etc/squid/block/movies/domains"
acl movies_urls url_regex "/etc/squid/block/movies/urls"
acl gamble_domains url_regex "/etc/squid/block/gamble/domains"
acl gamble_urls url_regex "/etc/squid/block/gamble/urls"
acl chat_domains url_regex "/etc/squid/block/chat/domains"
acl chat_urls url_regex "/etc/squid/block/chat/urls"
#acl webmail_domains url_regex "/etc/squid/block/webmail/domains"
#acl webmail_urls url_regex "/etc/squid/block/webmail/urls"
acl dating_domains url_regex "/etc/squid/block/dating/domains"
acl dating_urls url_regex "/etc/squid/block/dating/urls"
acl webradio_domains url_regex "/etc/squid/block/webradio/domains"
acl webradio_urls url_regex "/etc/squid/block/webradio/urls"
#acl _domains url_regex "/etc/squid/block"
acl share url_regex "/etc/squid/block/share/urls"
acl virus url_regex majesty italy-fund exitexchange trafficholder tamotua
acl proxyservers url_regex orkut rapidshare
acl proxyservers url_regex orkut proxy proxi prox rapidshare
acl rapidshare url_regex rapid
acl ncbi url_regex ncbi

http_access allow ncbi
http_access allow rapidshare murahari

http_access deny share
http_access deny virus
http_access deny proxyservers
http_access deny music_domains
http_access deny music_urls
http_access deny movies_domains
http_access deny movies_urls
http_access deny gamble_domains
http_access deny gamble_urls
http_access deny chat_domains
http_access deny chat_urls
#http_access deny webmail_domains
#http_access deny webmail_urls
http_access deny dating_domains
http_access deny dating_urls
http_access deny webradio_domains
http_access deny webradio_urls


###########---------------------------------##################



http_access allow local
#http_access allow local2

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname firecone
coredump_dir /var/spool/squid
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

//Lin u X u niL

No comments:

Post a Comment

tag ur valuable ideas below