Koozali.org: home of the SME Server
Other Languages => Français => Topic started by: 16roi on March 01, 2016, 11:41:20 AM
-
bonjour
est ce que il ya un moyen de programmer Accès à internet pour les utilisateurs!?
merci
salutations distinguées
-
Hi
you need a custom template for squid.conf with a time based acl
for example to allow access to internet during a certain time of the day (10:00 until 11:00 am) only on Monday (M), Wednesday (W), and Friday (F).
acl someDays time MWF 10:00-11:00
http_access allow forbidden someDays
http_access deny forbidden
read here about templating:
https://wiki.contribs.org/Template-driven_configuration_system
feel free to ask
-
something like:
mkdir -p /etc/e-smith/templates-custom/etc/squid/squid.conf
cd /etc/e-smith/templates-custom/etc/squid/squid.conf
nano 20ACL40daytime
fill the file with something like:
acl someDays time MWF 10:00-11:00
(adjust the days/time according to your needs)
save and close the file with Ctrl-X, Y
then (you've to be in /etc/e-smith/templates-custom/etc/squid/squid.conf)
cp /etc/e-smith/templates/etc/squid/squid.conf/40http_access75AllowLocal ./
nano 40http_access75AllowLocal
edit the content and make it like:
http_access allow localsrc someDays
save it with Ctrl-x, Y
then
expand-template /etc/squid/squid.conf
service squid restart
Note: not tested, should work