SlideShare a Scribd company logo
1 of 17
SQUID Proxy
Server
Amit
Jindal
What is proxy server?
● A web proxy server is an intermediary between
one (or more) client computers and a certain
network resource, the most common being
access to the Internet. In other words, the proxy
server is connected on one side directly to the
Internet (or to a router that is connected to the
Internet) and on the other side to a network of
client computers that will access the World
Wide Web through it.
What is proxy server?
Functions/Uses of proxy server
● Squid stores files from previous requests to speed
up future transfers. For example, suppose client1
downloads ubuntu14.04.iso from the Internet. When
client2 requests access to the same file, squid can
transfer the file from its cache instead of
downloading it again from the Internet. As you can
guess, you can use this feature to speed up data
transfers in a network of computers that require
frequent updates of some kind.
Functions/Uses of Squid proxy
server
● ACLs (Access Control Lists) allow us to restrict the
access to websites, and / or monitor the access on a
per user basis. You can restrict access based on
day of week or time of day, or domain, for example.
● Bypassing web filters is made possible through the
use of a web proxy to which requests are made and
which returns requested content to a client, instead
of having the client request it directly to the Internet.
Configuring Squid Server
1. Install Squid server
sudo apt-get install squid
2. Squid’s main configuration file is /etc/squid/squid.conf,
which is ~5000 lines long since it includes both
configuration directives and documentation. For that
reason, we will create a new squid.conf file with only the
lines that include configuration directives for our
convenience, leaving out empty or commented lines. To
do so, we will use the following commands.
Configuring Squid Server
mv /etc/squid3/squid.conf /etc/squid3/squid.conf.bkp
grep -Eiv '(^#|^$)' /etc/squid3/squid.conf.bkp >
/etc/squid3/squid.conf
(Run sudo -s before running above command to avoid permission denied )
Configuring client machine to use
proxy server
In Firefox
1. Go to the Edit menu and choose the Preferences option.
2. Click on Advanced, then on the Network tab, and finally on
Settings…
3. Check Manual proxy configuration and enter the IP address of
the proxy server and the port where it is listening for
connections.
Note: That by default, Squid listens on port 3128, but you can override
this behaviour by editing the access list rule that begins with http_port (by
default it reads http_port 3128).
4.Click OK to apply the changes.
Restricting access to a client
Suppose you want to explicitly deny access to a particular client IP
address, while yet maintaining access for the rest of the local network.
● Open the squid.conf file
sudo gedit /etc/squid3/squid.conf
● Add the following
acl studentA src 192.168.1.102
http_access deny studentA
(You can obtain IP Address by running ifconfig command )
● Restart squid server for the changes to take place.
sudo service squid3 restart
Restricting access by domain
● Add the following in squid.conf file
acl blocked_websites dstdomain .amazon.in
(You can also include a text file which contains the list of forbidden websites for eg.             
                                                                                acl blocked_websites dstdomain 
“/etc/squid/blocked_websites.txt” )
http_access deny blocked_websites
● Restart squid server for the changes to take place.
sudo service squid3 restart
Restricting access by time of day /
day of week
● Add the following in squid.conf file
acl somedays time MTWHF 13:00-14:00
http_access deny somedays
● Restart squid server for the changes to take
place.
sudo service squid3 restart
Using Cache to Speed Up Data
Transfer
One of Squid’s distinguishing features is the possibility of caching
resources requested from the web to disk in order to speed up future
requests of those objects either by the same client or others.
● Add the following directives in your squid.conf file.
maximum_object_size 100 MB
cache_dir ufs /var/cache/squid3 1000 16 256
cache_effective_user proxy
#coredump_dir /var/spool/squid3
refresh_pattern -i .(mp4|mp3|test|iso|jpeg)$ 2880 50% 10080
Using Cache to Speed Up Data
Transfer
A few clarifications of the above directives.
●
ufs is the Squid storage format.
● /var/cache/squid is a top-level directory where cache files will be stored.
This directory must exist and be writeable by Squid.
● 1000 is the amount (in MB) to use under this directory.
●
16 is the number of 1st-level subdirectories, whereas 256 is the number of
2nd-level subdirectories within /var/cache/squid3.
● The maximum_object_size directive specifies the maximum size of allowed
objects in the cache.
● refresh_pattern tells Squid how to deal with specific file types (.mp4 , .mp3
and .iso in this case) and for how long it should store the requested objects
in cache (2880 minutes = 2 days).
Viewing the requests being made
through the squid server
● You can view the live results of the request
being served through your squid server using
the below command in the server machine.
sudo tail -f /var/log/squid3/access.log
THANK YOU

More Related Content

What's hot

What is active directory
What is active directoryWhat is active directory
What is active directoryAdeel Khurram
 
Windows Server 2016 First Look (Part 1)
Windows Server 2016 First Look (Part 1)Windows Server 2016 First Look (Part 1)
Windows Server 2016 First Look (Part 1)Tuan Yang
 
1 introduction to windows server 2016
1  introduction to windows server 20161  introduction to windows server 2016
1 introduction to windows server 2016Hameda Hurmat
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networkingLorenzo Fontana
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage VirtualizationMehul Jariwala
 
Introduction to NGINX web server
Introduction to NGINX web serverIntroduction to NGINX web server
Introduction to NGINX web serverMd Waresul Islam
 
Installing & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOSInstalling & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOSDevin Olson
 
Enhance Virtual Machine Security in OpenStack Using Suricata IPS
Enhance Virtual Machine Security in OpenStack Using Suricata IPSEnhance Virtual Machine Security in OpenStack Using Suricata IPS
Enhance Virtual Machine Security in OpenStack Using Suricata IPSShila044184
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to NginxKnoldus Inc.
 

What's hot (20)

Wds
WdsWds
Wds
 
What is active directory
What is active directoryWhat is active directory
What is active directory
 
Open Source Cloud
Open Source CloudOpen Source Cloud
Open Source Cloud
 
Windows Server 2016 First Look (Part 1)
Windows Server 2016 First Look (Part 1)Windows Server 2016 First Look (Part 1)
Windows Server 2016 First Look (Part 1)
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
 
1 introduction to windows server 2016
1  introduction to windows server 20161  introduction to windows server 2016
1 introduction to windows server 2016
 
Nfs
NfsNfs
Nfs
 
Apache web server
Apache web serverApache web server
Apache web server
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
VPN: SSL vs IPSEC
VPN: SSL vs IPSECVPN: SSL vs IPSEC
VPN: SSL vs IPSEC
 
Proxy Server
Proxy ServerProxy Server
Proxy Server
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Understanding docker networking
Understanding docker networkingUnderstanding docker networking
Understanding docker networking
 
Nginx
NginxNginx
Nginx
 
Storage Virtualization
Storage VirtualizationStorage Virtualization
Storage Virtualization
 
Introduction to NGINX web server
Introduction to NGINX web serverIntroduction to NGINX web server
Introduction to NGINX web server
 
Installing & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOSInstalling & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOS
 
Enhance Virtual Machine Security in OpenStack Using Suricata IPS
Enhance Virtual Machine Security in OpenStack Using Suricata IPSEnhance Virtual Machine Security in OpenStack Using Suricata IPS
Enhance Virtual Machine Security in OpenStack Using Suricata IPS
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to Nginx
 
Linux and DNS Server
Linux and DNS ServerLinux and DNS Server
Linux and DNS Server
 

Viewers also liked

Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guidejasembo
 
Squid Caching for Web Content Accerlation
Squid Caching for Web Content AccerlationSquid Caching for Web Content Accerlation
Squid Caching for Web Content Accerlationrahul8590
 
Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba serverVeeral Bhateja
 
Squid proxy-server
Squid proxy-serverSquid proxy-server
Squid proxy-serverDwi Wahyudi
 
Sharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linuxSharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linuxjasembo
 
Resume Narya_UX Designer_2016
Resume Narya_UX Designer_2016Resume Narya_UX Designer_2016
Resume Narya_UX Designer_2016Shrankhla Narya
 
Neogeography
NeogeographyNeogeography
Neogeographyrahul8590
 
Datasheets- albatross lab
Datasheets- albatross labDatasheets- albatross lab
Datasheets- albatross labRobin Seamon
 
Advantages of proxy server
Advantages of proxy serverAdvantages of proxy server
Advantages of proxy servergreatbury
 
Firewall & its configurations
Firewall & its configurationsFirewall & its configurations
Firewall & its configurationsStudent
 
How a Proxy Server Works
How a Proxy Server WorksHow a Proxy Server Works
How a Proxy Server WorksMer Joyce
 
Http Proxy Server
Http Proxy ServerHttp Proxy Server
Http Proxy ServerSourav Roy
 
Dhcp Server Linux Server
Dhcp Server Linux ServerDhcp Server Linux Server
Dhcp Server Linux Servermuh kemal
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewallsphanleson
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applicationsphanleson
 

Viewers also liked (20)

Squid
SquidSquid
Squid
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guide
 
Squid Server
Squid ServerSquid Server
Squid Server
 
Squid Caching for Web Content Accerlation
Squid Caching for Web Content AccerlationSquid Caching for Web Content Accerlation
Squid Caching for Web Content Accerlation
 
Presentation on samba server
Presentation on samba serverPresentation on samba server
Presentation on samba server
 
Squid proxy-server
Squid proxy-serverSquid proxy-server
Squid proxy-server
 
Pg py-and-squid-pypgday
Pg py-and-squid-pypgdayPg py-and-squid-pypgday
Pg py-and-squid-pypgday
 
Proxy
ProxyProxy
Proxy
 
Sharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linuxSharing your-internet-connection-on-linux
Sharing your-internet-connection-on-linux
 
Resume Narya_UX Designer_2016
Resume Narya_UX Designer_2016Resume Narya_UX Designer_2016
Resume Narya_UX Designer_2016
 
Neogeography
NeogeographyNeogeography
Neogeography
 
Squid beak
Squid beakSquid beak
Squid beak
 
Datasheets- albatross lab
Datasheets- albatross labDatasheets- albatross lab
Datasheets- albatross lab
 
Advantages of proxy server
Advantages of proxy serverAdvantages of proxy server
Advantages of proxy server
 
Firewall & its configurations
Firewall & its configurationsFirewall & its configurations
Firewall & its configurations
 
How a Proxy Server Works
How a Proxy Server WorksHow a Proxy Server Works
How a Proxy Server Works
 
Http Proxy Server
Http Proxy ServerHttp Proxy Server
Http Proxy Server
 
Dhcp Server Linux Server
Dhcp Server Linux ServerDhcp Server Linux Server
Dhcp Server Linux Server
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewalls
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applications
 

Similar to Squid Proxy Server

18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]Krisman Tarigan
 
Squid proxy server
Squid proxy serverSquid proxy server
Squid proxy serverGreen Jb
 
cara menginstall router
cara menginstall routercara menginstall router
cara menginstall routerBobby Bobby
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway ServerDashamir Hoxha
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Serverswebhostingguy
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-serverHARRY CHAN PUTRA
 
Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...webhostingguy
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationAvinash Kumar
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsFederico Michele Facca
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopVelocidex Enterprises
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusDashamir Hoxha
 
Linux Administration Training | Linux Administration Will Never Go Out Of Fas...
Linux Administration Training | Linux Administration Will Never Go Out Of Fas...Linux Administration Training | Linux Administration Will Never Go Out Of Fas...
Linux Administration Training | Linux Administration Will Never Go Out Of Fas...Edureka!
 
17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]Krisman Tarigan
 
Bandwidth limiting howto
Bandwidth limiting howtoBandwidth limiting howto
Bandwidth limiting howtoDien Hien Tran
 
The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)Venugopal Gummadala
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE
 
Information System Security
Information System Security Information System Security
Information System Security Elijah Konzo
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with NginxBud Siddhisena
 

Similar to Squid Proxy Server (20)

Squid
SquidSquid
Squid
 
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
 
Squid proxy server
Squid proxy serverSquid proxy server
Squid proxy server
 
cara menginstall router
cara menginstall routercara menginstall router
cara menginstall router
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway Server
 
Ch 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet ServersCh 22: Web Hosting and Internet Servers
Ch 22: Web Hosting and Internet Servers
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
 
Firewall vpn proxy
Firewall vpn proxyFirewall vpn proxy
Firewall vpn proxy
 
Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...Implementing Advanced Caching and Replication Techniques in ...
Implementing Advanced Caching and Replication Techniques in ...
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server Administration
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and RadiusPPPoE With Mikrotik and Radius
PPPoE With Mikrotik and Radius
 
Linux Administration Training | Linux Administration Will Never Go Out Of Fas...
Linux Administration Training | Linux Administration Will Never Go Out Of Fas...Linux Administration Training | Linux Administration Will Never Go Out Of Fas...
Linux Administration Training | Linux Administration Will Never Go Out Of Fas...
 
17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]17937858 squid-server - [the-xp.blogspot.com]
17937858 squid-server - [the-xp.blogspot.com]
 
Bandwidth limiting howto
Bandwidth limiting howtoBandwidth limiting howto
Bandwidth limiting howto
 
The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Information System Security
Information System Security Information System Security
Information System Security
 
Scale Apache with Nginx
Scale Apache with NginxScale Apache with Nginx
Scale Apache with Nginx
 

Recently uploaded

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 

Recently uploaded (20)

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 

Squid Proxy Server

  • 2. What is proxy server? ● A web proxy server is an intermediary between one (or more) client computers and a certain network resource, the most common being access to the Internet. In other words, the proxy server is connected on one side directly to the Internet (or to a router that is connected to the Internet) and on the other side to a network of client computers that will access the World Wide Web through it.
  • 3. What is proxy server?
  • 4. Functions/Uses of proxy server ● Squid stores files from previous requests to speed up future transfers. For example, suppose client1 downloads ubuntu14.04.iso from the Internet. When client2 requests access to the same file, squid can transfer the file from its cache instead of downloading it again from the Internet. As you can guess, you can use this feature to speed up data transfers in a network of computers that require frequent updates of some kind.
  • 5. Functions/Uses of Squid proxy server ● ACLs (Access Control Lists) allow us to restrict the access to websites, and / or monitor the access on a per user basis. You can restrict access based on day of week or time of day, or domain, for example. ● Bypassing web filters is made possible through the use of a web proxy to which requests are made and which returns requested content to a client, instead of having the client request it directly to the Internet.
  • 6. Configuring Squid Server 1. Install Squid server sudo apt-get install squid 2. Squid’s main configuration file is /etc/squid/squid.conf, which is ~5000 lines long since it includes both configuration directives and documentation. For that reason, we will create a new squid.conf file with only the lines that include configuration directives for our convenience, leaving out empty or commented lines. To do so, we will use the following commands.
  • 7. Configuring Squid Server mv /etc/squid3/squid.conf /etc/squid3/squid.conf.bkp grep -Eiv '(^#|^$)' /etc/squid3/squid.conf.bkp > /etc/squid3/squid.conf (Run sudo -s before running above command to avoid permission denied )
  • 8. Configuring client machine to use proxy server In Firefox 1. Go to the Edit menu and choose the Preferences option. 2. Click on Advanced, then on the Network tab, and finally on Settings… 3. Check Manual proxy configuration and enter the IP address of the proxy server and the port where it is listening for connections. Note: That by default, Squid listens on port 3128, but you can override this behaviour by editing the access list rule that begins with http_port (by default it reads http_port 3128). 4.Click OK to apply the changes.
  • 9.
  • 10. Restricting access to a client Suppose you want to explicitly deny access to a particular client IP address, while yet maintaining access for the rest of the local network. ● Open the squid.conf file sudo gedit /etc/squid3/squid.conf ● Add the following acl studentA src 192.168.1.102 http_access deny studentA (You can obtain IP Address by running ifconfig command ) ● Restart squid server for the changes to take place. sudo service squid3 restart
  • 11. Restricting access by domain ● Add the following in squid.conf file acl blocked_websites dstdomain .amazon.in (You can also include a text file which contains the list of forbidden websites for eg.                                                                                              acl blocked_websites dstdomain  “/etc/squid/blocked_websites.txt” ) http_access deny blocked_websites ● Restart squid server for the changes to take place. sudo service squid3 restart
  • 12. Restricting access by time of day / day of week ● Add the following in squid.conf file acl somedays time MTWHF 13:00-14:00 http_access deny somedays ● Restart squid server for the changes to take place. sudo service squid3 restart
  • 13. Using Cache to Speed Up Data Transfer One of Squid’s distinguishing features is the possibility of caching resources requested from the web to disk in order to speed up future requests of those objects either by the same client or others. ● Add the following directives in your squid.conf file. maximum_object_size 100 MB cache_dir ufs /var/cache/squid3 1000 16 256 cache_effective_user proxy #coredump_dir /var/spool/squid3 refresh_pattern -i .(mp4|mp3|test|iso|jpeg)$ 2880 50% 10080
  • 14. Using Cache to Speed Up Data Transfer A few clarifications of the above directives. ● ufs is the Squid storage format. ● /var/cache/squid is a top-level directory where cache files will be stored. This directory must exist and be writeable by Squid. ● 1000 is the amount (in MB) to use under this directory. ● 16 is the number of 1st-level subdirectories, whereas 256 is the number of 2nd-level subdirectories within /var/cache/squid3. ● The maximum_object_size directive specifies the maximum size of allowed objects in the cache. ● refresh_pattern tells Squid how to deal with specific file types (.mp4 , .mp3 and .iso in this case) and for how long it should store the requested objects in cache (2880 minutes = 2 days).
  • 15.
  • 16. Viewing the requests being made through the squid server ● You can view the live results of the request being served through your squid server using the below command in the server machine. sudo tail -f /var/log/squid3/access.log