• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

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

{{postValue.id}}

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
{{postCtrl.cmtErrMsg}}

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

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 Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

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.