Squid Server

25

description

This Ppt contains some details about squid server, Linux must see it once.

Transcript of Squid Server

Page 1: Squid Server
Page 2: Squid Server

What is Squid?

Page 3: Squid Server

Other proxies

Page 4: Squid Server

What is a proxy?

Page 5: Squid Server

What is a caching proxy?

Page 6: Squid Server

How proxies work (configuration)

Page 7: Squid Server

Setup Proxy In Browser

Page 8: Squid Server

How proxies work (user request)

Page 9: Squid Server

Cacheable objects

Page 10: Squid Server

Non-cacheable objects

Page 11: Squid Server
Page 12: Squid Server

Transparent proxying

Page 13: Squid Server

Transparent proxying

Page 14: Squid Server

Squid hardware requirements

Page 15: Squid Server

1.x and 1.NOVM.x No longer supported Entire cache lost if even one disk in cache fails Doesn’t understand Cache-Control: tag Other problems Bottom line: don’t use them

Squid distributions (versions)

Page 16: Squid Server

2.0, 2.1, 2.2 Redesigned disk storage algorithm much improved Understands Cache-Control: tag Better LRU/refresh rule engine Supports proxy authentication See documentation for full list of enhancements

Recommendation: 2.1 is fairly stable, but move to 2.2 when 2.2STABLE released

Squid distributions (versions)

Page 17: Squid Server

acl manager proto cache_object acl localhost src 127.0.0.1/32 acl managerhost src 204.248.51.34/32 acl managerhost src 204.248.51.39/32 acl managerhost src 204.248.51.40/32 acl cawtech src 204.248.51.0/24 acl cawtech-internal src 172.16.0.0/16 acl all src 0.0.0.0/0.0.0.0

squid.conf ACL example

Page 18: Squid Server

acl SSL_ports port 443 563 acl gopher_ports port 70 acl wais_ports port 210 acl whois_ports port 43 acl www_ports port 80 81 acl ftp_ports port 21 acl Safe_ports port 1025-65535

acl CONNECT method CONNECT acl FTP proto FTP acl HTTP proto HTTP acl WAIS proto WAIS acl GOPHER proto GOPHER acl WHOIS proto WHOIS

squid.conf ACL example

Page 19: Squid Server

http_access deny manager !localhost !managerhost http_access deny CONNECT !SSL_ports http_access deny HTTP !www_ports !Safe_ports http_access deny FTP !ftp_ports !Safe_ports http_access deny GOPHER !gopher_ports !Safe_ports http_access deny WAIS !wais_ports !Safe_ports http_access deny WHOIS !whois_ports !Safe_ports

http_access allow localhost http_access allow cawtech http_access allow cawtech-internal http_access deny all

squid.conf ACL example

Page 20: Squid Server

File we Edit for Sqid  /etc/squid/squid.conf acl mysurfers srcdomain .facebook.com acl teachers src 192.168.1.0/255.255.255.0 acl students src 192.168.7.0-192.168.9.0/255.255.255.0 acl lunch time MTWHF 12:00-15:00

http_access deny localhost http_access allow teachers http_access allow students lunch time http_access deny all

visible_hostname machine-name http_port 3128 cache_dir ufs /var/spool/squid 1000 16 256 cache_access_log /var/log/squid/access.log

Sample proxy auto-configuration

Page 21: Squid Server
Page 22: Squid Server

Advantages of Squid

Page 23: Squid Server

Advantages of Squid

Page 24: Squid Server

Advantages of Squid

Page 25: Squid Server