• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to allow users to access the caches at specific times using Squid proxy server

2019

To allow users to access the caches at specific times using Squid proxy server

Squid is a proxy caching server. An HTTP proxy server is a program that accepts requests from clients for URLs and fetches them for the client and displays the results to the client. A proxy is also used for caching commonly requested pages so that it may retrieved for the users for future uses. In this tutorial we will be briefed about the explanation on how to allow some users to use the cache at specific time duration using Squid proxy server on CentOS 6.7.

Configuration procedure

To start the configuation procedure, check the status of Squid service.

[root@server3 ~]# service squid status

Create a file named sites.txt and enter the websites name that had to be blocked. Save and exit the file.

[root@server3 ~]# vim /etc/squid/sites.txt
www.facebook.com
www.flipkart.com
www.youtube.com

Add the following ACL rule in squid configuration file using vim editor and make the following changes. Save and exit the file.

[root@server3 ~]# vim /etc/squid/squid.conf
acl users src 192.168.7.206 192.168.7.216
acl access dstdomain " /etc/squid/sites.txt" 
acl break time 06:17-06:20
http_access allow users access break
http_access deny users access

Reload the Squid service by executing the following command.

[root@server3 ~]# service squid reload

To check the configuration of the Squid. Switch over to the browser and try to access the blocked site. The following error page will be displayed.

blocked facebook


blocked youtube

After the given time duration in Squid configuration file elapses, try to access the blocked sites. The blocked sites can be access without any glitches.
facebook login

youtube homepage

Thus conclues the configuration procedure of allowing some users to use the cache at specific time duration using Squid proxy server on CentOS 6.7.

Tags:
ismail
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

Why am I getting ``Proxy Access Denied?''

A

You may need to set up the http_access option to allow requests from your IP addresses. Please see the Access Controls section for information about that.

Q

I can't get local_domain to work; Squid is caching the objects from my local servers?

A

The local_domain directive does not prevent local objects from being cached. It prevents the use of sibling caches when fetching local objects.

Q

Cannot bind socket FD NN to *:8080 (125) Address already in use?

A

This means that another process is already listening on port 8080 (or whatever you're using). It could mean that you have a Squid process already running, or it could be from another program

Q

What is squid Proxy server?

A

Squid is a proxy caching server. An HTTP proxy server is a program that accepts requests from clients for URLs and fetches them for the client and displays the results to the client.

Q

What is squid configuration file?

A

The squid configuration file is as follows
# /etc/squid/squid.conf

Related Tutorials in How to allow users to access the caches at specific times using Squid proxy server

Related Tutorials in How to allow users to access the caches at specific times using Squid proxy server

How to limit bandwidth in Squid - Part 4
How to limit bandwidth in Squid - Part 4
Jun 28, 2016
How to clear RAM Memory Cache, Buffer & Swap Space on Linux
How to clear RAM Memory Cache, Buffer & Swap Space on Linux
Jun 25, 2016
How to Configure Nginx as a Reverse Proxy in CentOS
How to Configure Nginx as a Reverse Proxy in CentOS
Nov 26, 2016
How to install squid proxy server on freeBSD
How to install squid proxy server on freeBSD
Feb 10, 2017
How to block with keywords and extensions in SQUID - Part 2
How to block with keywords and extensions in SQUID - Part 2
Jun 22, 2016
How to Configure Reverse Proxy with Squid in CentOS
How to Configure Reverse Proxy with Squid in CentOS
Dec 9, 2016
How to install Squid in Webmin
How to install Squid in Webmin
Aug 26, 2017
How to Compile Squid Proxy Server 4.7v on CentOS 7.6
How to Compile Squid Proxy Server 4.7v on CentOS 7.6
Jun 14, 2019

Related Forums in How to allow users to access the caches at specific times using Squid proxy server

Related Forums in How to allow users to access the caches at specific times using Squid proxy server

Squid
oliver class=
how to clear squid cache
Feb 7, 2017
Cache
madridgenim class=
how to clear powerdns cache
Mar 14, 2018
Squid
owen class=
How to change default logformat in squid access log
Sep 1, 2017
Squid
hobbs class=
WARNING: Could not determine this machines public hostname. Please configure one or set visible_hostname.
Sep 21, 2017
Squid
oliver class=
How to allow only one site in SQUID
Feb 11, 2017
Squid
nathan class=
SARG : make[1]: *** [check-macro-version] Error 1
Sep 27, 2017
Squid
owen class=
How to view squid logs in human readable format
Sep 21, 2017
Squid
nicholas class=
How to limit download speed in SQUID
Feb 20, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.