How to configure the squid proxy server HARDWARE NETWORKING LINUX SOFTWAREIt Tech Technology

It Tech Technology

COMPUTER HARDWARE NETWORKING

Breaking

Home Top Ad

Post Top Ad

Thursday, January 28, 2016

How to configure the squid proxy server


How to configure the squid proxy server in RHEL6/CentOS6
                                          Squid Proxy Server


    Squid is a proxy server for caching and filtering web content . Squid proxy is used by various organisation and internet providers to reduce bandwidth and to increase response time .
Squid proxy service will cache the requested web-content and re-using it for the further request of the same content .

Port No:3128 (default) ,8080
Configuration File: /etc/squid/squid.conf
Required Package:squid

  • Install Squid proxy
  • Block specific web sites
  • Block specific keywords
  • Block Specific IP Address
  • Allow Full Access to specific IP Address
  • Changing squid proxy port number
  • Restricting download size

Install Squid proxy:

Step1: Install squid package

#yum install squid* -y

     By default squid configuration file “/etc/squid/squid.conf” will contains recommended minimum configuration and squid caching feature will work without making any changes .

Step2:Restart the squid service

#chkconfig squid on
#service squid restart

Step3:Setup your web browser to access Internet through proxy server on port 3128.
IE : Tools » Internet options »Connections » LAN settings » Choose “Use a proxy server for your LAN” » “Type your Proxy server ip (192.168.1.2 ) and port no 3128”
Firefox : Edit » Preferences » Advanced » Network » Settings » Choose “Manual proxy configuration ” » “Type your Proxy server ip (192.168.1.2 ) and port no 3128”
Step4:Browse some site and check log file

#cat /var/log/squid/access.log
1355301698.350 1991 192.168.1.2 TCP_MISS/200 14330 GET http://5.178.71.5/ - DIRECT/5.178.71.5 text/html

1355301703.927 5413 192.168.1.2 TCP_MISS/304 301 GET http://www.google-analytics.com/ga.js -

Troubleshoot:
If you not able to access the internet through proxy settings, disable the Firewall (IP tables) and SE-Linux settings.

Disable Firewall (IPtables):

#chkconfig iptables off
#service iptables stop

Disable SELinux :

#vim /etc/selinux/config
SELINUX =enforcing replace with “SELINUX=disabled”

Now reboot the system and try to browse.



Configure the squid proxy as Web Filter 



Post Bottom Ad