Installing Squid on Windows Home Server (WHS) 2011

UPDATE: December 8th, 2014 – Squid 3 MSI installer package built for Microsoft Windows (including WHS) is now available at http://squid.diladele.com.

This post will try to guide you easily through the process of Installation and Setting Up of the latest Squid 2 stable build (2.7) on Windows Home Server 2011. This is a remake of my previous post devoted to doing the same in the first version of Windows Home Server and filled with unnecessary details that most people find far too technical to successfully keep themselves concentrated :). Hope this simple “view and do as I do” screenshot powered HOWTO will be more helpful to you.

So I assume you have your Windows Home Server 2011 up and running and you did the successful logon to the server desktop like it is shown on the following screenshot.

Step 1. Downloading and Unpacking

The binaries for Windows can be downloaded from Squid for Windows
page of Acme Consulting as shown on the following screenshots.

Select stable 2.7 version of Squid and save it into the Downloads folder.

Do the right mouse click on the downloaded file and “Extract all…” here.

Wait until the archive is extracted…

Now we are ready to proceed with the installation.

Installing Squid

In order to install Squid we need to do some command prompt magic. Open up the Run window by pressing Windows+R, type cmd in the input box and press Enter.

The command prompt appears. Now type cd C:\Users\Administrator\Downloads\squid-2.7.STABLE-bin and press Enter again. The command prompt current folder will change into folder where we have unpacked squid earlier (see screenshot below).

Now we need to copy the unpacked squid folder to the root folder of C: drive. For now, the easiest solution is to keep squid installed in C:\squid and do NOT try to put it into the usual C:\Program Files folder. So type xcopy /S squid c:\squid\ in the command prompt and wait until all files are copied.

Now change the current directory of the command prompt to the C:\squid folder by typing cd C:\squid (shown on the following screenshot).

The C:\squid\etc folder contains for files with .conf.default extension, we need to erase the extension from all of them leaving only .conf instead.

Now change the command prompt to the sbin folder by typing cd c:\squid\sbin. When it is done, install Squid as a Windows Service by typing squid -i in the command prompt.

Press Windows+R and type services.msc in the input box and then press Enter to start the Services MMC Snap-in.

Check the squid service is successfully installed. NOTE: if you try to start the service now it will give errors, the reason for this is that some of the folder and caching information is missing.

We will need to create a folder in the C:\squid installation directory. Press right mouse button in the Explorer window and select New -> Folder. Name it var as shown on the following screenshots.

Now create another folder named logs inside of the var folder.

Switch to the command prompt and type squid -z being in the C:\squid\sbin folder to create a cache directory structure inside the var folder. Check that is it created by looking at the contents of the var\cache folder in the Windows Explorer.

Switch to the Services snap-in and start the Squid service (right click on the service name and choose Start). The service status should turn into “Started” and squid.exe process will be shown in the Task Manager.

Open up the Internet Explorer (still being at your server desktop), choose Internet Options -> Connections -> LAN settings. Select the Use proxy server… checkbox and type localhost 3128 there as shown on the following screenshot.

Navigate to the http://squid-cache.org to see the browser now goes to the Internet thorough Squid.

Just to be sure everything works as expected, open C:\squid\var\logs\access.log and notice a lot of entries there.

Post Install Firewall Configuration

In order to use the just installed proxy from another machines in the home network, we need to tweak the firewall setting of the Windows Home Server 2011. Open Server Manager and choose Windows Firewall, Inbound Rules node. Press the New Rule… button at the top right of the window.

Select Port checkbox.

Select TCP and Specific local port, type 3128 there. This is the port number the Squid usually listens to for incoming requests from the browsers.

Select Allow the connection and press Next.

Check all the boxes on the next step and press Next.

Name the newly created rule as you like. Press Finish to complete the wizard steps.

Now open up another computer in your home network, specify the name or IP address of the WHS server as the proxy name and proxy port 3128. Type your favorite web site in the browser’s address bar and surf!

N.B. The same installation procedure can actually be applied to any version of Windows,… so this HOWTO will help you run Squid proxy on Windows XP, Windows 2003, Windows Vista, 7 and Windows Server 2008.

What is Next?

Having a common caching proxy in your home network is good, but having all explicit and ad stuff filtered out of your browsing is better, so the next step would be to follow the How to install QuintoLabs Content Security 1.4 on your Windows Home Server 2011 to harden your proxy installation.

About sichent

sichent
This entry was posted in Network, proxy, squid, WHS. Bookmark the permalink.

11 Responses to Installing Squid on Windows Home Server (WHS) 2011

  1. Pingback: Installing Squid Proxy on Windows Home Server | sichent

  2. kaneco says:

    Hello,

    Just a question the Squid proxy have a web interface to be configured?
    Best regards

  3. sichent says:

    Hi kaneco,
    I always configure Squid using command line… not sure but I think webmin has some web UI based configuration tool – but it may be a little bit outdated. Also not clear if it works for WHS. The command line (notepad) editing is simple though and usually done only once… so there is not so many points in creating a UI for that single purpose I guess.
    regards,
    sich.

  4. Pingback: Content Filtering on Windows Home Server 2011 | sichent

  5. Pingback: Windows Home server 2011 vail in ITALIANO « Crottolo – Quello che voglio dire su di me :-)

  6. Sam says:

    Excellent tutorial, thanks for the tips.

    I have yet to set up my WHS 2011 box but would you be able to use this proxy server remotely (outside the home network)?

    Thanks

    • sichent says:

      Frankly speaking . I just do not know… I am using the WHS for outbound access only (home network to world), but I guess using it other way around is also not hard… at least I saw some tutorial on the web somewhere that tried to explain just that – access the WHS (or another home proxy) from outside of the network…

  7. Sam says:

    Hmm… I can imagine will need to experiment.

    Basically I want to replace an Ubuntu/SSH setup where what I’m after is readily achievable… I can’t quite see how it would work with WHS… even if I used an external(forwarded) address as my proxy server how would it authenticate? How can I tunnel through my work proxy to that proxy?

    Another question you may be able to answer is about the panel allowing you to connect to internal clients over RDP… do you know if that occurs through the session you initially create or does it just facilitate a direct connection to the client? Again looking at how I can get this stuff through the work proxy….

  8. Brandon says:

    Just got this set up on my WHS 2011 and am tunneling from work.

    In addition to these steps, all I had to do was forward port 3128 from the router to the static IP of my WHS machine.

    • Sam says:

      Excellent!

      I now have a WHS 2011 box so will be working on this ASAP.

      If your at work does it just prompt you for a username/password after setting to use it as a proxy?

      Can you browse localhost addresses once its authenticated?

  9. Pingback: Installing Squid on Windows Home Server 2011 | Our online home away from home

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s