About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Thursday, August 11, 2011

SQUID Configuration On REDHAT LINUX-5



Server: sandeeplinux-server ( Local Network IP)
Client: Linux & Windows XP/2003 etc...
Default Port NO: 3128

Requirement: This SQUID package available on RHEL5 DVD only

Installation Of Required Packages:

[root@sandeeplinux-server RHEL5_Total_Pack]# rpm -i squid-2.6.STABLE6-3.el5
warning: squid-2.6.STABLE6-3.el5: Header V3 DSA signature: NOKEY, key ID 37017186
[root@sandeeplinux-server RHEL5_Total_Pack]#

Configure SQUID config file:

NOTE: Modify squid.conf file (Before Modifying any Files take one backup copy)

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

Uncomment Bellow lines in config file...

Access Control Lists

# Add in ACL your local network information
acl all src (Allow here your local network Address)

One Sample Passage for ACL configuration

#Recommended minimum configuration:
acl all src
acl manager proto cache_object
acl localhost src
acl to_localhost dst
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl blocksites dstdomain .orkut.com
acl blocksites dstdomain .facebook.com
acl blocksites dstdomain .youtube.com
http_access deny blocksites
acl banned src
http_access deny banned
acl localnetwork src
http_access allow localnetwork
acl blockfiles urlpath_regex /etc/squid/blocks.files.acl
deny_info ERR_BLOCKED_FILES blockfiles
http_access deny blockfiles
acl business_hours time M T W H F 9:00-19:00
acl RestrictedHost src
http_access deny RestrictedHost
http_access allow business_hours
acl bad url_regex "/etc/squid/squid-block.acl"
http_access deny bad

Now Try To Start SQUID Service & Keep Permanently On:

[root@sandeeplinux-server squid]# service squid status
squid is stopped
[root@sandeeplinux-server squid]# service squid start
Starting squid: [OK]
[root@sandeeplinux-server squid]# chkconfig squid on
[root@sandeeplinux-server squid]#

Now Check SQUID/PROXY with Windows Client:

Go To Internet Explore --> Properties --> Connections --> LAN Settings --> Use a Proxy Server for your LAN --> Give server IP or Name --> Port 3128 --> OK


For Writing our own Notice Messages and all modification you can do in /usr/share/squid/errors/English

[root@sandeeplinux-server English]# vi ERR_ACCESS_DENIED

Write Message Save & Exit and Restart once your squid server.

Thanks and Regards,
Sandeep CC


  1. please post this article


  2. thnx sandeep but ..sry for interfare..u above mention ip ..but i think it is wrong with my reckoning there is set plz tell me i am wrong or right...thnx (kishor sasiit mohali)