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: centos.ipserverone.com * base: centos.ipserverone.com * epel: mirror01.idc.hinet.net * extras: centos.ipserverone.com * updates: centos.ipserverone.com 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 ===================================================================================== Installing: 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 Installed: squid.i386 7:2.6.STABLE21-6.el5 Complete!
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 192.168.2.0/24
# 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