On my previous post I discussed How to setup a caching or
proxy DNS using ACRYLIC. Here I will discuss how to setup SQUID Proxy server
for windows. There are other alternative to squid like Freeproxy and AnalogXproxy, but I choose SQUID since I’m more familiar with it and I want to test
how reliable it will run on a Windows host, at work we also uses SQUID but on
LINUX.
This setup will work hand in hand with the ACRYLIC DNS Proxy
that I’ve setup to further maximize my Internet connection. Aside from caching
some benefits that you may gain using SQUID is that it acts as a Firewall and
limits your other users to http traffic only meaning web browsing only or your
usual messenger application, all other traffic like torrent or VOIP will not
pass through unlike in the case if we use NAT for Internet sharing.
Installing SQUID 2.7.Stable8 on Windows 7
SQUID doesn't come in an installer package but in a zip file where the directory structure and needed files are package together.You can download the zip file here. Once downloaded uncompressed the zip file. Once uncompressed you will get a squid directory. Copy that squid directory to drive c:\
Inside squid directory you'll see the following folders and files:
Next create a folder where you want to place your page cache. I created mine on "d:\proxy".
(this step is optional I did this because I want to separate the Proxy cache directory from the squid Directory)
Inside squid folder go to etc folder make a copy of squid.conf.default and name it squid.conf
do that also to mime.conf.default
Open squid.conf in notepad or any editor of your choice.
Change the path of cache_dir
(if you did not create a separate folder for cache you can skip this step).
Look for the following lines
# Note that for coss, max-size must be less than COSS_MEMBUF_SZ
# (hard coded at 1 MB).
#
#Default:
# cache_dir ufs c:/squid/var/cache 100 16 256
edit it so it will look like this
# (hard coded at 1 MB).
#
#Default:
# cache_dir ufs c:/squid/var/cache 100 16 256
cache_dir ufs d:/proxy 100 16 256
Next look for the following lines
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
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
and edit it so it will look like this
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#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/24 # RFC1918 possible internal network
of course provided that your network is in 192.168.0.0 range. Change this to reflect your network setting.
Next look for the following lines (optional - I edit this line to force squid to use my DNS caching server)
# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# (IP addresses) to use instead of those given in your
# /etc/resolv.conf file.
# On Windows platforms, if no value is specified here or in
# the /etc/resolv.conf file, the list of DNS name servers are
# taken from the Windows registry, both static and dynamic DHCP
# configurations are supported.
#
# Example: dns_nameservers 10.0.0.1 192.172.0.4
#
#Default:
# none
and edit it so it will look like this
# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# (IP addresses) to use instead of those given in your
# /etc/resolv.conf file.
# On Windows platforms, if no value is specified here or in
# the /etc/resolv.conf file, the list of DNS name servers are
# taken from the Windows registry, both static and dynamic DHCP
# configurations are supported.
#
# Example: dns_nameservers 10.0.0.1 192.172.0.4
#
#Default:
# none
dns_nameservers 127.0.0.1
Open a command prompt, and run the following command:
/squid/sbin/squid -z
this command initializes squid and create the directories on the cache folder.
After that run
squid/sbin/squid
to start the squid process.
After this you can now setup your browser to use the SQUID Proxy server. The ip address will be the ip of the squid server (usually the first available ip on your network), port number if you did not change it will be 3128.




