Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Tuesday, October 12, 2010

Browse » Home » , , , , , , , , , , , » How to install and configure SQUID Proxy Server in Windows?

How to install and configure SQUID Proxy Server in Windows?



Here’s another guide again by me to configure / installing SquidCache Proxy to be an Anonymous Proxy Server and filtering some ads /banners (on Windows not Linux since most Linux users already know aboutthis) :)
   

  • First download Squid 2.7 Stable 1 for Windows from HERE and don’t forget to extract it into a directory of your choice, and Download JAP from HERE & JAP FULL PACKAGE from HERE.And as a note, i wrote this tutorial using Squid 2.6 Stable 1 so ifyou’re using Squid 2.5 series there’s some parameters you’ll need tochange first in order for it to work
Note: in this tutorial i’ll use E:\Squid as the Squid Directory
  • Afterextracting it into E:\Squid, go into etc directory “E:\Squid\etc” andrename all the .default file into .conf file. 
For example squid.conf.default -> squid.conf , mime.conf.default -> mime.conf, etc
  • Opensquid.conf file using your favorite text editor such as Notepad,Ultraedit, etc. and configure it like this (you can change it later) :)but im not going into more detail here since most squid configurationare self explanatory and that’s depending on your hardware too (forexample the memory size, cache size, etc). But you can always use thissquid.conf directly in your squid configuration without changing any ofits parameter as long as you extract squid into E:\Squid directoryotherwise you’ll need to change every parameter that include E:\squidinto your squid path
# HTTP Port (in this tutorial squid will run on localhost at port 3128)
http_port 127.0.0.1:3128
# ICP Port and HTCP Port (we’ll disable this since we are not going to use it)
icp_port 0
htcp_port 0

# Cache Peer (we’ll forward all request into parent proxy)
cache_peer 127.0.0.1 parent 4001 7 no-query
# Cache directory (in this example i was using 3000 MB / 3 GB space to store squid cache)
cache_dir awin32 e:/squid/var/cache 3000 16 256
#  access_log
access_log e:/squid/var/logs/access.log squid
#  cache_log
cache_log e:/squid/var/logs/cache.log
#  cache_store_log
cache_store_log none
#  mime_table
mime_table e:/squid/etc/mime.conf
#  pid_filename
pid_filename e:/squid/var/logs/squid.pid
#  unlinkd_program
unlinkd_program e:/squid/libexec/unlinkd.exe
# refresh_pattern (you can configure this as you like it, to get more hits from a website)
 

# note: if you change this parameter “refresh_pattern . 1 100% 20160 reload-into-ims ignore-reload” into something else for
 

# example like “refresh_pattern . 10 100% 20160 reload-into-ims ignore-reload
 

#there’ll be some error on some page (Gamefaqs.com for an example)because the page didnt reload correctly after login into Gamefaqs
refresh_pattern ^http://.*\.gif$ 1440 50% 20160 reload-into-ims
refresh_pattern ^http://.*\.asis$ 1440 50% 20160
refresh_pattern -i \.png$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.jpg$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.bmp$ 10080 150% 40320 reload-into-ims
refresh_pattern -i \.gif$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.ico$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.swf$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.flv$ 10080 300% 40320 reload-into-ims
refresh_pattern -i \.rar$ 10080 150% 40320
refresh_pattern -i \.ram$ 10080 150% 40320
refresh_pattern -i \.txt$ 1440 100% 20160 reload-into-ims override-lastmod
refresh_pattern -i \.css$ 1440 60% 20160
refresh_pattern ^http:// 1 100% 20160 reload-into-ims ignore-reload
refresh_pattern ^ftp:// 240 50% 20160
refresh_pattern ^gopher:// 240 40% 20160
refresh_pattern /cgi-bin/ 0 0% 30
refresh_pattern . 0 100% 20160 reload-into-ims
 
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
# Block access to Malware & ads farm site
# Insert your own rule here by using
# acl blablabla url_regex -i “path to file
# or
# acl blablabla url_regex “path to file

http_access allow localhost
http_access deny all
cache_mgr Reaper-X
httpd_suppress_version_string on
visible_hostname Reaper
via off
forwarded_for off
log_icp_queries off
client_db off
never_direct allow all

#Some anonymizing
header_access From deny all
#there’s some website which use referer check so its better to disable this
#header_access Referer deny all

header_access WWW-Authenticate deny all
header_access Link deny all
header_access Warning deny all
header_access Via deny all
header_access User-Agent deny all
header_access Proxy-Connection deny all
header_access X-Forwarded-For deny all
 
Now the next step would be running JAP, configure browsers to use Squid Proxy and start squid and you’re finished …. ;)
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top