June 16, 2013
How to Install Squid Proxy Server on Windows
I wanted a proxy server installation with basic authentication. Squid proxy server is a well known open source proxy server but it is mainly for Unix. If you want to try Squid for Windows follow the steps below:
- Downlaod squid for windows: http://squid.acmeconsulting.it/download/squid-3.0.STABLE23-BZR-bin.zip
- Extract to C:\\squid
- Go to c:\\squid\\etc
- Rename squid.conf.default to squid.conf
- Rename mime.conf.default to mime.conf
- Raname cachemgr.conf.default to cachemgr.conf
- Edit squid.conf and search for: auth_param basic program
- Make sure the line is uncommented and reads as:
C++
1 |
auth_param basic program c:/squid/libexec/ncsa_auth.exe c:/squid/etc/passwd |
- Search for: acl CONNECT method CONNECT
- Right after the line above add the following
C++
1 2 |
acl ncsa_users proxy_auth REQUIRED http_access allow ncsa_users |
- To generate a password file go to: http://www.htaccesstools.com/htpasswd-generator-windows
- Enter a user name and password
- Click the create button
- Copy the generated text and paste it into notepad
- Save the file as C:\\squid\\etc\\passwd
- From the command line: Go to C:\\squid\\sbin
- Type: squid -z
- Type: squid -i
- To verify windows service was installed type:
C++
1 |
wmic service where name="squid" get name, caption, state |
- To start the service type:
C++
1 |
wmic service where name="squid" call startservice |
- Make sure the service is running:
C++
1 |
wmic service where name="squid" get name, caption, state |
- To quickly test if the server was installed properly and prompts for a user and password use your browser manual proxy settings.
- The default port is 3128
- If you decide to uninstall the service type:
C++
1 |
squid -r |
Please use the comments section below for questions, corrections or feedback. Thanks for reading.
Tags:Windows
About Author
Mohammed Abualrob
Software Engineer @ Cisco
2 Comments
I followed all the steps, the browser prompts me for a username and password but it seems like the proxy server isn’t recognizing it.
Installation, configuration process is very difficult. please design with easy graphic user interface, and minimal prompt or customization.
Thank you for your great job.