Welcome to

LINUX WORLD

Rohit Mehta : A Linux Follower

bangalore, Karnataka, India
hi! i m a person who is chill all time. Since jan 2008 i am working for Novell software. The word Impossible does not exist in my dictionary because Impossible says i m possible...hey guys have fun with linux...it begins but has no end......

Tuesday, November 17, 2009

How to configure squid proxy server on redhat/linux


http://funlinuxfun.blogspot.com/
5-26-2009-6-17-01-PMWhat actually a proxy server means??
A proxy server is a server within a network which provides an extra layer of security and prevents the users direct access to the internet.. Squid is the most widely used proxy server which also provides caching which enablessquid to store requested objects and thus speeding up internet access.
Configuring a squid proxy is an easy task and allows you with wide number of options to configure your users access to the internet .
The best part is that squid is supported on all open source platforms
In this article I will explain on how to configure squid proxy server on redhat / linux.

For configuring squid server we first we need to install squid rpm
Step: 1)
#rpm –ivh squid-2.6.STABLE-5.el5_1.3.i386.rpm
You can also use yum repository for installation . If your system doesnot provide you can configure the yum server for your own
After configuring yum server install the squid rpm using
#yum –y install squid
Step2:) Open the squid main configuration file :
#vim /et c/squid/squid.conf

This is the main configuration file which holds all the squid settings and controls.
Step3:) Squid , by default runs on port 3128. If we need to change the web proxy port.
In the file search for http_port 3128 and change it to http_port 8080.
Now your squid web proxy will run on port 8080.
Step4:) Next you need access rules for the proxy server which are known as ACL to limit users’ ability to browse the Internet. Squid matches each Web access request it receives by checking the http_access list from top to bottom. If it finds a match, it enforces the allow or deny statement and stops reading further. You have to be careful not to place a deny statement in the list that blocks a similar allow statement below it. The final http_access statement denies everything, so it is best to place new http_access statements above it
Here are some examples of the ACL
¬
Restricting web access by IP address
acl mylan src 172.24.0.0/16
http_access allow mylan
Restricting web access by phrase in the url
acl myphrase url_regex phrase
http_access deny myphrase

Step 5:) Like every linux application squid needs to be restarted for changes to the configuration file can take effect..
# service squid restart
For enabling squid startup after the reboot:
#chkconfig squid on
You need to force users to use your proxy server by configuring the proxy setting in the web browser.
Now you can add an extra layer of security and reduce internet bandwidth charges.

No comments:

Which Linux distribution has ease of use?