Installing Squid Web Proxy Server on Windows 7

Squid is a caching proxy server that can help reduce internet bandwidth usage and improving response time of loading a website by caching and re-using frequently opened web page. Squid reduce the bandwidth usage and accelerate the website loading by caching static website objects such as images, flash objects and text files, with some modification Squid can cache larger files such as PDF, MP3, executables, flash videos, etc.

In this tutorial we will install Squid NT which is a fork from Linux version of Squid to Windows 7 (seven). To begin with the installation, first download the package from here: Squid NT and then extract it to C:\ drive. After extracting the content of package you should see a folder named ‘squid’ on C:\ drive, the full path should be C:\squid. Another way is first extract the zip package on where you save it and then move the ‘squid’ directory to C:\

Modifying configuration file

Now we need to modify some files before we configuring Squid. Go to ‘etc’ folder on C:\squid\etc\ you’ll see these files:

  • cachemgr.conf.default
  • mime.conf.default
  • squid.conf.default
  • squid_radius_auth.conf.default

You need to copy and rename these files:

  • cachemgr.conf.default -> cachemgr.conf
  • mime.conf.default -> mime.conf
  • squid.conf.default -> squid.conf

From the three configuration files we only need to configure squid.conf file. The configuration file cachemgr.conf and mime.conf by default will be sufficient for our basic setup.

The default setting on squid.conf generally is ready to use, but you need to make note on these parts:

1. Search for ‘acl localnet src’ you’ll see:

You can comment out the settings that are not applicable for your network configuration, in my case I use 10.0.0.0/8 network configuration so I’ll comment out the other two lines as I don’t need it. You can comment by adding hash key ‘#’. The end result would be like this:

2. Search for ‘dns_nameservers’
Under the explanation, you should add your ISP dns nameservers. The format should look like this:

Now save the changes and close the file. Until these steps, it should be enough to start Squid, you can modify the configuration later on.

Installing Squid service

These steps will install the Squid service so we can restart Squid from Windows’ Control Panel.

1. First we have to disable User Account Control (UAC) settings to be able to install Squid service. Go to: “Control Panel > System and Security > Change User Account Control settings” and move the bar to “Never Notify”, you need to restart Windows 7 to make the settings effective.

Change UAC settings to be able to setup Squid as service

Change UAC settings to be able to setup Squid as service

2. After reboot, open command prompt by clicking on Windows Logo (start), then type ‘Command Prompt’ on the search box and press enter.

Search for "Command Prompt" and press enter

Search for "Command Prompt" and press enter

3. Go to Squid’s sbin directory by typing:

4. Install Squid service with this command (please re-types this and not copy paste to make sure you have the correct character code):

You should get this information:

Squid service installation

Squid service installation

5. Setup Squid’s cache (please re-types this and not copy paste to make sure you have the correct character code):

You should get this information:

6. After Squid service is installed and the cache is created, now let’s start the service by going to Control Panel > System and Security > Administrative Tools > Services. Look for ‘Squid’, select it and press the start button.

Open the service manager

Open the service manager

Start Squid service

Start Squid service

Now if you see on the Task Manager > Services, you can see Squid service have a Running status.

Squid process on task manager

Squid process on task manager

7. As Squid service is up and running, we need to configure the browser to access the internet via proxy server. On Internet Explorer go to Tools > Internet Options > Connections > LAN Settings, give check on “Use a proxy server for your LAN …” and fill the Address field with your Squid server IP Address (in this case your PC IP address) with the Port 3128 (standard Squid port, you can modify this on squid.conf), click OK twice to save the settings.

Internet Explorer options

Internet Explorer options

Click on LAN Settings

Click on LAN Settings

Add your PC IP address and Port 3128

Add your PC IP address and Port 3128

8. Next step is to test whether our configuration is correct. Go to this site: www.whatismyipaddress.com and you should see “Proxy Server Detected!” message, something similar like this:

Check whether Squid working correctly

Check whether Squid working correctly

9. As everything is working, now we need to re-enable User Account Control (UAC). Go to: “Control Panel > System and Security > Change User Account Control settings” and move the bar to “Default” it’s the 3rd bar, you need to restart Windows 7 to make the settings effective.

I hope this tutorial is clear enough, but in case you still have question please sign-up and post a comment.

29 thoughts on “Installing Squid Web Proxy Server on Windows 7

  1. Pingback: Squid NT on Windows 7 | Markus Blog

  2. saurabh

    sir i need full detail of squid configration (like some pdf ,video)
    if you have some training material plz send me on my mail.

    thanks

    Reply
  3. Michael

    Nice tutorial. A little tip: If you run cmd with an right-klick and choose “run as admin” you don’t need to disable UAC in order to install the service – no reboot required at all

    Reply
  4. Marco Antonio Lopez

    Good tutorial.
    But if you want to use your Windows 7 computer as the proxy of your other computer at home or office, you must “open” the input TCP 3128 port in the Windows 7 firewall.

    Reply
  5. Steven

    Rather than use your ISP’s nameservers can you instead use Google’s or OpenDNS?
    I like Google’s because they’re easy to remember and work well; they are 4.4.4.4 and 8.8.8.8.

    Also rather than going Control Panel > System and Security > Administrative Tools > Services, one could type services.msc into the “search programs and files” box of the start menu.

    Thanks very much for the tutorial, I would’ve got stuck at the part where you have to edit squid.conf and needed help but having the whole thing step by step made it very easy. I didn’t hit any problems aside the download link being outdated (but I’d already been to Squid NT’s site so I didn’t need the link). At time of writing, this tutorial works perfectly with Squid 2.7 Stable8, and the link is:

    http://squid.acmeconsulting.it/download/squid-2.7.STABLE8-bin-DELAYP.zip

    Reply
      1. Maya

        Anybody that can help with setting up transparent proxy for Squid on Windows?

        My ADSL router only work in Bridged mode, so I have to use a proxy to get my Kindle 3 and SONY to update and connect to the internet. Unfortunately the Kindle does not have the option to “Proxy Settings” anywhere. Seems the only way to get around this is to use transparent/interception proxy.

        Thanx for a very good article

        Regards

        Marius

  6. Goback

    hi dear,
    ty for your nice post.
    when i want to start squid , i get this error:

    —————————
    Services
    —————————
    The Squid service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
    —————————
    OK
    —————————

    any solution?
    Regards
    Sam

    Reply
    1. Talk Web ID Post author

      did you do the installation of squid service as Administrator? try running Command Prompt as Administrator (right click and then select “Run as administrator”

      Reply
    1. Talk Web ID Post author

      the configuration part is almost the same. to install squid on Ubuntu you have to run this command:

      sudo aptitude install squid squid-common

      then you have to configure the /etc/squid/squid.conf file, save the changes and start the service:

      sudo /etc/init.d/squid restart

      Reply
    1. Talk Web ID Post author

      Proxy and DNS is 2 different thing. Proxy is for caching web content so that you can get the same content from local server (which is faster) instead of retrieving the same content from original server. of course by using google DNS will help on resolving domain name addresses which in the end also help a bit on browsing experience.

      Reply
  7. Nouman Aziz

    I am distribution internet. I have 100 clients each with 512kb download speed. For faster browsing which will be best squid proxy server or google dns. Or should I use both?

    Thanks

    Reply
  8. Nouman Aziz

    Hi. What are PC minimum requirements?

    Also when the hdd gets nearly full. Will this not slows the server down?

    Thanks

    Reply
    1. Brandon

      I hate to be one of those RTFM guys, but seriously, native Squid is very well documented. Aside from the binary installation and some minor configuration changes its all the same.

      But to answer your Question. You don’t need that much processor overhead specific to squid. As for RAM a rough estimate has been stated,10 MB of RAM per GB of the total of all cache directories.(more for 64 bit systems).
      And squid documentation recommends doubling that.

      This is of course in addition to what ever you need to run your system sufficiently prior to installing squid.

      Nice write up by the way!

      Reply
  9. Mahesh

    Hi there,
    Thanks for this wonderful article, but I have 2 questions though

    1. How to set the proxy server to use both NTLM and Basic authentication.
    2. How do I add users for the Basic authentication.

    If you can share these details it would be of great help.

    Reply
  10. arvind

    hello sir…
    i have a problem. whenever i am doing the setting for LAN from internet option my internet automatically stopped working no page open. after restore the setting internet start working. services of squid server is stated in my pc. please tell me what is the problem.. and also tell me which address is fill in address and port number in LAN setting.
    plz help me as soon as possible

    Reply
  11. Opoes

    Nice tuts..

    But not working on Windows 8.

    Can anybody help me…?

    Squid cannot install on windows 8, with warning “OpenSCManager Failed”

    Reply
    1. Talk Web ID Post author

      have you tried to run the installer as administrator?

      on step 2, after searching the Command Prompt, right click on it and select “run as administrator”, then follow the rest of the steps

      Reply
  12. Ems Varghese

    Res sir,
    I installed Squid in windows and working fine how to enable it in a transparent mode.
    Thanks for advance …

    Reply
    1. Talk Web ID Post author

      to be able to set transparent mode on Squid NT you have to install a software that can do port forwarding, which is not free.

      Reply
  13. Dumidu

    Thank you very much for the nice tutorial. I installed squiid on windows7. Is there a way to access my home squiid installed computer ip from out side? How do I use my home ip address from another city or a country? Thanks!

    Reply
    1. Talk Web ID Post author

      you have to forward incoming port of squid on your router to your PC (where you install squid) and then just input your public IP address (you can check by searching ‘what is my ip’ on google) to your laptop browser (for example) and try access internet via other connection. keep in mind that for this to work you have to setup correct port forwarding on your router and your ISP allow that incoming port connection to your router (some ISP block incoming port, such as 80 so customer can’t host website on their home connection)

      Reply
      1. Dumidu

        Thank you for the advice. If I set up a virtual private network, Is it possible to access my squiid server from a remote computer without port forwarding.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">