How to configure SQUID Proxy server in Linux

Steps to install and configure a perfect squid proxy server in Linux. This configuration Should work on all rpm based distributions(Redhat,CentOS,Fedora,etc.)
After basic setup, see the Advanced Squid configuration page of squid server
Linux Proxy server
Step1: Install squid packages first

[root@server ~#]yum install squid

Step2: Edit the squid's configuration file "squid.conf" located in /etc/squid/
[root@server ~#]vi /etc/squid/squid.conf

#In 18th line add your proxy client network(if to 255) and a name for network (here netusers is acl name)
acl netusers src

#In the 51st line, allow internet access to above specified network range 
http_access allow netusers

# in the 64th line (remove # if present), and change port number if required
http_port 3128

#Add the below 3 lines to the bottom of file
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access Cache-Control deny all

#Add the below line to bottom
forwarded_for off

#Add below line to bottom(add your visible hostname)

visible_hostname servercomputing
#(now save the squid.conf file)

Step3: start squid daemon
[root@server ~#]service squid start

Step4: In the allowed clients( to Configure web browser's proxy settings to use the proxy server for internet access.
here and 3128 is proxy server's ipaddress and port
(settings for mozilla firefox)
Tips: see the Advanced Squid configuration page of squid server
Important: squid will listen on port 3128/tcp, you should open this port in firewall or click here to Disable firewall

Was this helpfull ?


Eduard said...

Thank you so much for your nice tutorial.

Recently I setup a Reverse Proxy Server with Squid (server accelerator) and wrote a full detailed tutorial that you can find in:

where I explain how to configure Squid (version 3.x) as a reverse Proxy Server (server accelerator), providing examples about how to do it using two
computers (one as a Proxy server and another as a Web Server) or just by using one single computer.

I also describe how to format the Squid's logs and how to send the logs to a remote computer.
Also, you can find an explanation of how to deny access to certain files and how to get correct logs in Apache Web Server.

I wish it is useful to someone.

Julia David said...

Your this blog is very informative and interesting. Keep doing this type of great work.
access eMp3World in UK

Related Posts Plugin for WordPress, Blogger...

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons