Your best bet really is to search Google for squid tutorials. There are a bunch of them out there.
No experience with time limiting, so I can't help you there. For restricting some, but not all, by IP, I have done that. You create lists of IPs like this:
Code:
acl block_IPs src 192.168.16.0/24
This creates a list called "block_IPs" that is the entirety of 192.168.16.0
Code:
acl allow_IPs src 192.168.16.100
acl allow_IPs src 192.168.16.107
This creates a list called "allow_IPs" that includes two specific IP addresses. You can add more IPs by adding more lines.
I have a very short whitelist that's allowed everywhere, and a few PCs in each location that have unrestricted access. To create the whitelist, use the following:
Code:
acl whitelist url_regex .microsoft.com
acl whitelist url_regex .windowsupdate.com
Again, one item per line. This creates a a list of URLs called "whitelist" using regex rules (which you need someone far more knowledgeble than me to tutor you on).
The trick is get your access commands in the correct order. So far as I can tell, it processes them in order, and stops when it reaches one that applies to a particular connection. So to allow access to specific IPs, you put that in first:
Code:
http_access allow allow_IPs
A request from an IP on "allow_IPs" will be allowed, and squid will stop processing.
Otherwise, , to allow access to the white list only for the blocked list of IPS, you add:
Code:
http_access allow whitelist
If the URL is on "whitelist" list, it will be allowed, and squid will stop.
Otherwise, add this:
Code:
http_access deny block_IPs
And any IP on the "block_IPs" list will be blocked, and told that access has been denied, and squid will stop processing.
If, for some reason, the IP isn't on either list, and the URL isn't on the whitelist, squid will allow access by default (presumably as a transparent proxy, otherwise, it's easy to bypass, but you have to turn that on in the GUI).
Again, do not put this in the squid.conf file, or it will possibly be overwritten by a future IPCop update. This belongs in the include.acl file in /var/ipcop/proxy/acls
One more note: This isn't a terribly efficient way to do this, from what I understand. There are other ways of putting information like this in to a database that are far more efficient. If, like me, your lists of IPs and URLs is short, and you're not pushing old, worn-out hardware to its limits, it doesn't make much of a difference. If if you have a large white list or black list, it can impact your internet speed.
Also, very important note: After you have saved your changes, you have to stop and restart squid, or the changes will not take effect. The easy way to do this is to turn off, then back on, the proxy in the GUI.