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

Firewall and Types of firewall
Firewall and Types of firewallFirewall and Types of firewall
Firewall and Types of firewallCoder Tech
 
User administration concepts and mechanisms
User administration concepts and mechanismsUser administration concepts and mechanisms
User administration concepts and mechanismsDuressa Teshome
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configurationRohit Phulsunge
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksRaghav Bisht
 
IP tables and Filtering
IP tables and FilteringIP tables and Filtering
IP tables and FilteringAisha Talat
 
unified threat management by Nisha Menon K
 unified threat management by Nisha Menon K unified threat management by Nisha Menon K
unified threat management by Nisha Menon KNisha Menon K
 
RIA Cross Domain Policy
RIA Cross Domain PolicyRIA Cross Domain Policy
RIA Cross Domain PolicyNSConclave
 
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyNginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyAmit Aggarwal
 

What's hot (20)

Firewall and Types of firewall
Firewall and Types of firewallFirewall and Types of firewall
Firewall and Types of firewall
 
User administration concepts and mechanisms
User administration concepts and mechanismsUser administration concepts and mechanisms
User administration concepts and mechanisms
 
Proxy Server
Proxy ServerProxy Server
Proxy Server
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configuration
 
Wireshark
WiresharkWireshark
Wireshark
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
Proxy Servers
Proxy ServersProxy Servers
Proxy Servers
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
 
IP tables and Filtering
IP tables and FilteringIP tables and Filtering
IP tables and Filtering
 
unified threat management by Nisha Menon K
 unified threat management by Nisha Menon K unified threat management by Nisha Menon K
unified threat management by Nisha Menon K
 
RIA Cross Domain Policy
RIA Cross Domain PolicyRIA Cross Domain Policy
RIA Cross Domain Policy
 
File permissions
File permissionsFile permissions
File permissions
 
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyNginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
 
Proxy Servers
Proxy ServersProxy Servers
Proxy Servers
 
Firewall
Firewall Firewall
Firewall
 
Nfs
NfsNfs
Nfs
 
Proxy
ProxyProxy
Proxy
 
Firewall
FirewallFirewall
Firewall
 
Wintel ppt for dhcp
Wintel ppt for dhcpWintel ppt for dhcp
Wintel ppt for dhcp
 
Dmz
Dmz Dmz
Dmz
 

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
 
ISCSI server configuration
ISCSI server configurationISCSI server configuration
ISCSI server configurationThamizharasan P
 

Viewers also liked (20)

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
 
ISCSI server configuration
ISCSI server configurationISCSI server configuration
ISCSI server configuration
 

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

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

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