I have two kinds of users accessing squid. I want the first group can access always internet, the second should only be allowed to access internet at certain times.
I have users on the same file (created with htpasswd).
How can achieve this?
Thanks in advance,
First of all you have to set up authentication
Add the following to the authentication section of your squid.conf
You will want to change the path to the password file to match your password file location. You may want to change the
credentialsttl
if you want people to authenticate more frequently.In the a ACL section of your squid.conf add the following
You may want to create your
allowed_anytime
andallowed_by_time
elsewhere so change the paths above.The file
allowed_anytime
should contain a list of users who can use the internet all the time e.g.The file
allowed_by_time
should contain a list of users who can use the internet during the time specified by theallow_hours
acl e.g.