Search squid archive

MySQL backend for time restrictions of clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Everyone,

 

I have seen a very nice to restrict internet access by hours.

The concept is pretty simple.

Per client you have a time table which contains the day and the hour in the day as integers.

For example the next table:

##

user_id, day, hour, allow

1, 0, 8, 0

1, 0, 9, 1

1, 0, 20, 1

1, 0, 21, 0

##

 

So the client with user_id 1 which is being resolved in another table can use the Internet at 09:00 until 21:00 on Sunday (day 0)

 

I wrote a helper that runs a query against the DB and resolve the right user_id for the IP and decides whether  to allow or deny internet access.

 

There are other ideas on how to implement a similar solution and if someone implemented any other solution with a DB backend please share.

 

Thanks,

Eliezer

 

----

Eliezer Croitoru

NgTech, Tech Support

Mobile: +972-5-28704261

Email: ngtech1ltd@xxxxxxxxx

Web: https://ngtech.co.il/

My-Tube: https://tube.ngtech.co.il/

 

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux