How to Install and Configure Squid Proxy Server in CentOS 5.5

In this post, i will guide you on how to install and configure squid proxy server with basic configuration. Squid proxy server and make web browzing fast as it reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Please follow below steps to configure your squid proxy server.

    [root@server ~]# yum -y install squid
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * addons:
     * base:
     * epel:
     * extras:
     * updates:
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package squid.i386 7:2.6.STABLE21-6.el5 set to be updated
    --> Finished Dependency Resolution
    Dependencies Resolved
     Package         Arch           Version                         Repository      Size
     squid           i386           7:2.6.STABLE21-6.el5            base           1.3 M
    Transaction Summary
    Install       1 Package(s)
    Upgrade       0 Package(s)
    Total download size: 1.3 M
    Downloading Packages:
    squid-2.6.STABLE21-6.el5.i386.rpm                             | 1.3 MB     00:24
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : squid                                                         1/1
      squid.i386 7:2.6.STABLE21-6.el5

1. Configure main squid configuration file. Use vi to edit.

    [root@server ~]# vi /etc/squid/squid.conf

2. The defaults port is TCP 3128. However you can change it to 9090 or 8080.
# Change Line 919 as below:

    http_port 8080

3. Add list of internal IP networks from where browsing should be allowed. In this example the ip network segment named intranet_local.
# add below on Line 590 ( allow only intranet_local)

    acl intranet_local src

# add below on Line 637

    http_access allow intranet_local
    4. Configure auto start at boot for squid service and start squid server: 

    [root@server ~]# chkconfig squid on
    [root@server ~]# /etc/init.d/squid start
    Starting squid: .                                          [  OK  ]

5. Configure your client browser with proxy server ip address with port 8080.
6. Test from client using this URL

Leave a Reply

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

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee