what is proxy server ? it blocks the users from accessing ... · pdf file• it blocks the...

17

Upload: ngocong

Post on 07-Feb-2018

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb
Page 2: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

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.

Page 3: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

Squid Proxy Server

Squid proxy can be configured as :-

• A Simple Proxy (ie to share server)

• A Caching Web Server

• A Firewall

Page 4: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

WindowsClient

ProxyServer

LinuxClient

192.168.0.253

192.168.0.1

www.yahoo.com

210.10.152.15

How Proxy Server works ?

192.168.0.2

Page 5: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

Requirements

• Packages

squid-2.5.STABLE6-3.i386.rpm

• Port Numbers

3128 (default)

• Configuration File

/etc/squid/squid.conf

• Service

squid

• Daemon

squid

Page 6: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

WindowsClient

ProxyServer

LinuxClient

192.168.0.253

192.168.0.1

www.yahoo.com

210.10.152.15

Proxy Server Configuration

192.168.0.2

Page 7: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

Configuring Proxy Server

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 ~]# cd /mnt

[root@comp1 ~]# rpm -ivh squid* --force --aid

Open configuration for editing

[root@comp1~]# vi /etc/squid/squid.conf

Page 8: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

/etc/squid/squid.conf

To change the options

http_port 3128

cache_dir ufs /var/spool/squid 100 16 256

visible_hostname linux-squid

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 test url_regex www.yahoo.com

http_access allow our_networks business_hours test

Page 9: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

Proxy Server

To restart the Proxy services

[root@comp1 ~]# service squid restart

Page 10: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

Configuring Proxy Client - Linux

Configuring Proxy Client – Text Mode

[root@comp1 ~]# elinks

In Elinks window

• Go to ‘Setup’ menu and Select ‘Options Manager’ .

• In the ‘Protocols’, select on ‘Http’.

• Select the ‘Proxy Configuration’ option.

• In ‘Host and port number’, select ‘Edit’.

• Type ‘Proxy IP address’ and ‘Proxy Port No.’

• Then select ‘Save’ and ‘OK’.

• ‘Close’

Page 11: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

Configuring Proxy Client - Linux

Configuring Proxy Client - Graphically

• Open ‘Mozilla / Firefox’.

• Go to ‘Edit’ menu and Select ‘Preferences’ .

• In the ‘General’, click on ‘Connection Settings’.

• Select the ‘Manual Proxy Configuration’ option.

• In the ‘Http Proxy’ box, type ‘Proxy IP address’

• In the ‘Http proxy Port’ box, type ‘Proxy Port No.’

Page 12: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

http://www.yahoo.com

Page 13: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

WindowsClient

ProxyServer

LinuxClient

192.168.0.253

192.168.0.1

www.yahoo.com

210.10.152.15

How Proxy Server works ?

192.168.0.2

Web request

for

www.yahoo.co

m

From :192.1

68.0.1

To : 192.

168.0.2

53

Web Reply from

www.yahoo.co

m

From : 192.

168.0.2

53

To : 192.

168.0.1

Web Request for www.yahoo.com

From : 192.168.0.253To : 210.10.152.15

Web Reply from www.yahoo.com

From : 210.10.152.15To : 192.168.0.253

www.yahoo.com Web Pages

Cached

Page 14: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

http://www.yahoo.com

Page 15: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

http://www.yahoo.com

Page 16: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

WindowsClient

ProxyServer

LinuxClient

192.168.0.253

192.168.0.1

www.yahoo.com

210.10.152.15

How Proxy Server works ?

192.168.0.2

Web request for

www.yahoo.com

From :192.168.0.2

To : 192.168.0.253

Web Reply from

www.yahoo.com

From : 192.168.0.253

To : 192.168.0.1

www.yahoo.comCached

Web Page

Page 17: What is Proxy Server ? It blocks the users from accessing ... · PDF file• It blocks the users from accessing undesirable websites ... 192. 1 68. 0. 1 To : 192. 1 68. 0. 253 W eb

http://www.yahoo.com