Вы находитесь на странице: 1из 12

1

What is Proxy Server ?

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.

2
Squid Proxy Server

Squid proxy can be configured as :-

A Simple Proxy (ie to share server)

A Caching Web Server

A Firewall

3
How Proxy Server works ?

Web Request for


www.yahoo.com
From : 192.168.0.253
Proxy
Proxy
www.yahoo.com To : 210.10.152.15
www.yahoo.com
Server
Server Web
WebPages
Pages
Cached
Cached Web Reply from
192.168.0.253
192.168.0.253 www.yahoo.com
r From : 210.10.152.15
fo
est com .1 To : 192.168.0.253
qu o .0. www.yahoo.com
www.yahoo.com
re ho 168 253
eb w.ya 92. 8.0. m
W w :1 16 ro m 3
w om 92. l y f .co .25 210.10.152.15
210.10.152.15
Fr : 1 p o 0
Re ho 68. 0.1
To eb w.ya 92.1 68.
W w 1 2.1
Linux
Linux w m : 19
Client o :
Client Fr To Windows
Client
Client
192.168.0.1
192.168.0.1
192.168.0.2
192.168.0.2

4
How Proxy Server works ?

Proxy
Proxy
www.yahoo.com
www.yahoo.com
Server
Server Cached
Cached
Web
WebPage
Page
192.168.0.253
192.168.0.253

We w.y 192 68.0


ww m : 2.1
b r ah .168 .253
F r : 19
www.yahoo.com

eq oo .0
www.yahoo.com

o
To

ue .co .2
We w.y 92. 168.

st m
ww m : 1 192.
b R ah 168 0.1
Fr To

for
o :
210.10.152.15
210.10.152.15

ep oo.c .0.2
ly
fro om 3
m
Linux
Linux

5
Client
Client
Windows
192.168.0.1
192.168.0.1 Client
Client
192.168.0.2
192.168.0.2

5
Requirements

Packages
squid-2.5.STABLE6-3.i386.rpm
Port Numbers
3128 (default)
Configuration File
/etc/squid/squid.conf
Service
squid
Daemon
squid

6
Proxy Server Configuration

Proxy
Proxy
Server
Server
192.168.0.253
192.168.0.253

www.yahoo.com
www.yahoo.com

210.10.152.15
210.10.152.15

Linux
Linux
Client
Client Windows
Client
Client
192.168.0.1
192.168.0.1
192.168.0.2
192.168.0.2

7
Configuring Proxy Server

Install
Installthe
thepackage
packageby
byusing
usingone
oneof
ofthe
theinstallation
installationmethods
methods
[root@comp1~]#
[root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1
[root@comp1~]#
~]#cd cd /mnt
/mnt
[root@comp1
[root@comp1~]#
~]#rpm
rpm -ivh
-ivh squid*
squid* --force
--force --aid
--aid

Open
Openconfiguration
configurationfor
forediting
editing
[root@comp1~]# vi /etc/squid/squid.conf
[root@comp1~]# vi /etc/squid/squid.conf

8
/etc/squid/squid.conf

To
Tochange
change the
theoptions
options
http_port
http_port 3128
3128
cache_dir
cache_dir ufs/var/spool/squid
ufs /var/spool/squid100
10016
16256
256
visible_hostname
visible_hostname linux-squid
linux-squid
acl
acl our_networks src192.168.0.0/24
our_networks src 192.168.0.0/24
acl
aclbusiness_hours
business_hourstime
time SS M
MTTW
WHHFFAA 09:00-17:30
09:00-17:30
acl
acltest
testurl_regex
url_regex www.yahoo.com
www.yahoo.com
http_access
http_access allow
allow our_networks
our_networks business_hours
business_hours test
test

9
Proxy Server

To
Torestart
restartthe
theProxy
Proxyservices
services
[root@comp1 ~]# service squid restart
[root@comp1 ~]# service squid restart

10
Configuring Proxy Client - Linux

Configuring
ConfiguringProxy
ProxyClient
Client Text
TextMode
Mode
[root@comp1 ~]# elinks
[root@comp1 ~]# elinks

In
InElinks
Elinkswindow
window
Go
Go to Setup menu and Select OptionsManager
to Setup menu and Select Options Manager ..
In
Inthe
the Protocols
Protocols,,select
selecton
on Http
Http..
Select
Selectthe
the Proxy
ProxyConfiguration
Configuration option.
option.
In
In Host and port number , select Edit
Host and port number , select Edit..
Type
Type Proxy
ProxyIP
IPaddress
address and
and Proxy
ProxyPort
PortNo.
No.
Then select Save and OK
Then select Save and OK . .
Close
Close

11
Configuring Proxy Client - Linux

Configuring
ConfiguringProxy
ProxyClient
Client--Graphically
Graphically
Open Mozilla / Firefox
Open Mozilla / Firefox ..
Go
Goto
to Edit
Edit menu
menuandandSelect
Select Preferences
Preferences ..
In
Inthe
the General
General,, click
clickon
on Connection
ConnectionSettings
Settings..
Select
Select the Manual Proxy Configuration option.
the Manual Proxy Configuration option.
In the Http Proxy box, type Proxy IP address
In the Http Proxy box, type Proxy IP address
In
Inthe
the Http
Httpproxy
proxy Port
Port box,
box,type
type Proxy
ProxyPort
PortNo.
No.

12

Вам также может понравиться