Download Configuring Proxy Cache with Squid: Understanding Proxy Servers & Squid Features and more Schemes and Mind Maps Computer Networks in PDF only on Docsity! By Yoobsan B 1 Configure a Proxy Caches (Squid). ï¶Upon completion of this topic students will able to: o Configure and use Squid. o Explain why use Squid. 12/30/2019 By Yoobsan B 2  What do you mean by Proxy Server? o  A Proxy Server refers to physical machine or Application which acts intermediate between client and resource provider or server. o A client seeks for file, page or data from the proxy server and proxy server manages to get the requested demand of client fulfilled by handling all the complexities in between. 12/30/2019 By Yoobsan B 5 What is the default port of squid and how to change its operating port? o  The default port on which squid runs is 3128. o We can change the operating port of squid from default to any custom unused port by editing its configuration file which is located at /etc/squid/squid.conf as suggested below. o Open â/etc/squid/squid.confâ file and with your choice of editor. o # nano /etc/squid/squid.conf o Now change this port to any other unused port. o Save the editor and exit. o http_port 3128 Restart the squid service as shown below. ïŒ # service squid restart 12/30/2019 By Yoobsan B 6 You works for a company the management of which ask you to block certain domains through squid proxy server. What are you going to do? o Blocking domain is a module which is implemented well in the configuration file. We just need to perform a little manual configuration as suggested below. o a. Create a file say âblacklistâ under directory â/etc/squidâ. o # touch /etc/squid/blacklistb. Open the file â/etc/squid/blacklistâ with nano editor. o # nano /etc/squid/blacklistc. Add all the domains to the file blacklist with one domain per line. o .facebook.com .twitter.com .gmail.com .yahoo.com ...d. Save the file and exit. Now open the Squid configuration file from location â/etc/squid/squid.confâ. o # nano /etc/squid/squid.confe. Add the lines below to the Squid configuration file. o acl BLACKLIST dstdom_regex -i â/etc/squid/blacklistâ http_access deny blacklistf. Save the configuration file and exit. Restart Squid service to make the changes effective. o # service squid restart 12/30/2019 By Yoobsan B 7 What is Media Range Limitation and partial download in Squid? o Media Range Limitation is a special feature of squid in which just the required data is requested from the server and not the whole file. o This feature is very well implemented in various videos streaming websites like Youtube and Metacafe where a user can click on the middle of progress bar hence whole video need not be fetched except for the requested part. o The squidâs feature of partial download is implemented well within windows update where downloads are requested in the form of small packets which can be paused. o Because of this feature a update downloading windows machine can be restarted without any fear of data loss. o Squid makes the Media Range Limitation and Partial Download possible only after storing a copy of whole data in it. o Moreover the partial download gets deleted and not cached when user points to another page until Squid is specially configured somehow. 12/30/2019 By Yoobsan B 10 A client approaches you, who is working. They want the web access time be restricted for their children. How will you achieve this scenario? o Say the web access allow time be 4âo clock to 7âo clock in the evening for three hours, sharply form Monday to Friday. o a. To restrict web access between 4 to 7 from Monday to Friday, open the Squid configuration file. # nano /etc/squid/squid.conf o b. Add the following lines and save the file and exit. acl ALLOW_TIME time M T W H F 16:00-19:00 shttp_access allow ALLOW_TIMEc. o Restart the Squid Service. # service squid restart 12/30/2019 By Yoobsan B 11 Squid stores data in which file format? o Data stored by Squid is in ufs format. o Ufs is the old well-known Squid storage format. 12/30/2019 By Yoobsan B 12 Where do cache gets stored by squid? o  A squid stores cache in special folder at the location â/var/spool/squidâ. 12/30/2019