Squid proxy installation in windows server

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. Squid has a variety of uses and advantages such as speeding up web browsing for the end user, reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. It also can work as web filtering and can control the browsing traffic.

Squid is based on the Harvest Cache Daemon developed in the early 1990’s. It was one of two forks from the codebase after the Harvest project ran to completion.

Installation of  Squid Proxy

1. Download the Squid proxy for windows from the squid.acmeconsulting.it/index.html and extract the zip file . In this post, I choose to extract it to the folder “C:\Squid”

Launch the ‘Squid’ proxy setup from Windows >> Click ‘Next’ and complete installation :

2. Rename the files in folder C:\Squid\etc of squid files by removing “ default”

Note: Squid.conf is the default configuration file and do the changes on that file. By defaul,t the squid using the port 3128 and we can change the port number on the configuration file.

3. Creating the swap directory

> Open the command prompt on the machine and change the directory :
# cd c:\squid\sbin  

Once inside the folder please enter below command
# squid -z

4. Install Squid as a Window Service

Run the below command for install the Squid as windows services

# squid -i

5. Start and stop for the squid services

We can start/stop the squid service from service.msc by clicking ‘Squid’ under the ‘Services’

6. Setup the windows firewall for squid proxy

In order to access the squid proxy server, needs to open the port in windows firewall for that please follow the below steps,

>> Select the option “Windows firewall with Advanced Security”
>> Click the ‘Inbound Rules’ and select the ‘New Rule’ under the action
>> Then the select the option ‘Port’ as the type of rule
>> Next page enter the Port number for squid services and follow as below :

Select TCP and Provide 3128 near ‘Specific local ports’
Under ‘Actions’ tab select ‘Allow the connection’
Under ‘Profile’ tab, select ‘Domain’ , ‘Public’ , ‘Private’
Under ‘Name’ provide ‘squid_services’

7. Adding multiple IP’s with different port

We can configure the multiple IP’s with a different port number. First, we need to open the port in the firewall (please use the above procedures). After that open the squid configuration file and the below line on the top of that

http_port 45.XX1.1XX.2XX:3129
acl myip_45.XX1.1XX.2XX myip 45.XX1.1XX.2XX
tcp_outgoing_address 45.XX1.1XX.2XX myip_45.XX1.1XX.2XX
http_access allow myip_45.XX1.1XX.2XX

http_port 45.XX1.1XX.2XX:3130
acl myip_45.XX1.1XX.2XX myip 45.XX1.1XX.2XX
tcp_outgoing_address 45.XX1.1XX.2XX myip_45.XX1.1XX.2XX
http_access allow myip_45.XX1.1XX.2XX

Then, save the configuration files and restart the squid service.

If you would rather have an expert server admin install it for you, contact SupportPRO team

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Reply