Proxy
Proxy
Proxy Server controls client computer s access to the Internet. It blocks the users from accessing undesirable websites and hides the internal identity of the network. It improves performance by storing webpages locally. It is generally used to share internet from one machine to several clients. Squid Proxy is widely used as Proxy because it provides many features & is an open source.
Squid proxy can be configured as :A Simple Proxy (ie to share server) A Caching Web Server A Firewall
Proxy Proxy www.yahoo.com www.yahoo.com Server Web Pages Server Web Pages
or tf m es .co 0.1 qu o . re ho 168 253 eb w.ya 92. 8.0. m W w :1 16 fro m 3 w om 92. ly o.co 0.25 p Fr : 1 Re ho 68. 0.1 To eb w.ya 92.1 68. W w 1 2.1 w m : 19 o : Windows Fr To
192.168.0.253 192.168.0.253
Cached Cached
www.yahoo.com www.yahoo.com
210.10.152.15 210.10.152.15
Client Client
192.168.0.2 192.168.0.2
Proxy Proxy www.yahoo.com www.yahoo.com Server Cached Server Cached 192.168.0.253 192.168.0.253
Web Page Web Page
for st m ue .co .2 eq oo .0 b r ah .168 .253 We w.y 192 68.0 ww m : 2.1 o F r : 19 m fro om 3 To 5 ly ep oo.c .0.2 b R ah 168 0.1 We w.y 92. 168. ww m : 1 192. o : Fr To
www.yahoo.com www.yahoo.com
210.10.152.15 210.10.152.15
Requirements
Packages squid-2.5.STABLE6-3.i386.rpm Port Numbers 3128 (default) Configuration File /etc/squid/squid.conf Service squid Daemon squid
Install the package by using one of the installation methods Install the package by using one of the installation methods [root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# rpm -ivh squid* --force --aid [root@comp1 ~]# rpm -ivh squid* --force --aid
Open configuration for editing Open configuration for editing [root@comp1~]# vi /etc/squid/squid.conf [root@comp1~]# vi /etc/squid/squid.conf
/etc/squid/squid.conf
To change the options To change the options http_port 3128 http_port 3128 cache_dir ufs /var/spool/squid 100 16 256 cache_dir ufs /var/spool/squid 100 16 256 visible_hostname linux-squid visible_hostname linux-squid acl our_networks src 192.168.0.0/24 acl our_networks src 192.168.0.0/24 acl business_hours time S M T W H F A 09:00-17:30 acl business_hours time S M T W H F A 09:00-17:30 acl test url_regex www.yahoo.com acl test url_regex www.yahoo.com http_access allow our_networks business_hours test http_access allow our_networks business_hours test
Proxy Server
To restart the Proxy services To restart the Proxy services [root@comp1 ~]# service squid restart [root@comp1 ~]# service squid restart
10
Configuring Proxy Client Configuring Proxy Client [root@comp1 ~]# elinks [root@comp1 ~]# elinks
In Elinks window In Elinks window Go to Setup menu and Select Options Manager .. Go to Setup menu and Select Options Manager In the Protocols ,,select on Http .. In the Protocols select on Http Select the Proxy Configuration option. Select the Proxy Configuration option. In Host and port number ,, select Edit .. In Host and port number select Edit Type Proxy IP address and Proxy Port No. Type Proxy IP address and Proxy Port No. Then select Save and OK .. Then select Save and OK Close Close
11
Configuring Proxy Client --Graphically Configuring Proxy Client Graphically Open Mozilla / Firefox .. Open Mozilla / Firefox Go to Edit menu and Select Preferences .. Go to Edit menu and Select Preferences In the General ,, click on Connection Settings .. In the General click on Connection Settings Select the Manual Proxy Configuration option. Select the Manual Proxy Configuration option. In the Http Proxy box, type Proxy IP address In the Http Proxy box, type Proxy IP address In the Http proxy Port box, type Proxy Port No. In the Http proxy Port box, type Proxy Port No.
12