Link to home
Start Free TrialLog in
Avatar of DrDamnit
DrDamnitFlag for United States of America

asked on

Limit Internet usage by time by account

I would like to setup a proxy like the ones that exist in hotels where you must have an account to access the internet. My requirements are:

1. You must have an account when on the network to access the internet.
2. Accounts should be able to be time limited. So, if Jake has two hours, and he logs in to access the internet, and two hours expires, he cannot log in again until the next day.
3. Linux based solutions are preferred.
4. Firewall or Proxy based solutions (so this works no matter what computer the user logs in from) are preferred.

What is out there?
ASKER CERTIFIED SOLUTION
Avatar of yarwell
yarwell

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Squdi is out there.

Linux O/S (I prefer CentOS)
Squid Proxy Server
NetFilter/IPtables FireWall

With squid you can have

user accounts
ACL (Access control lists) based on time, account, IP, MAC and some other 30 options
Bandwidth Limiting
Many more options
SOLUTION
Avatar of madunix
madunix

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello!
I use squid proxy server on RH-like Linuxes.I searched the documentation,and there is no such feature as allowed duration of internet connection per day...That feature would be very welcome in such environments,and I guess that a script should be written for that purpose.The way I see is it should be:
1)The script(a croned script,actually) should check logs to see the unique users that connected and write the first appearance of the username  and the time in some kind of temporary file
2)Every now and then,a script should check if the present time is ALLOWED_DURATION more  than the first appearance of any username
3)If yes,the user should be disabled from accessing internet via squid
4)At the end of the day,a list of disable users should be reset...
Now,I am amazed that such a necessary feature has not been added to squid yet(someone correct me if I am wrong).
If I have more time next days,I will try to write a script to do that,but the problematic part will be disabling users that exceeded the time limit...involves reloading squid everytime someone is disabled..Anyway,is this Linux you plan to use RedHat-like?How many users(~10,~100?).
Avatar of RonHoffmann
RonHoffmann

IPcop is a free linux option with addins that will do what you want.
www.ipcop.org

Untangle is another linux based option with a choice of free or more advanced paid solutions
www.untangle.com

astaro has free and paid solutions as well ( this probably the best but the most expensive)
www.astaro.com
As said above by yarwell....  At home have a hardware firewall (erased the linksys firmware on my router with the DD_WRT) and on each PC running microsft. I run the Comodo Internet security (both firewall and anti-virus) and implemented beside that Squid Linux proxy server.

Be aware open source firmware DD-WRT offers a number of builds, from a Micro and Mini generic with limited capabilities  all the way to a VoIP-specific and VPN-specific build. Fortunately, a chart lists  all the capabilities and various versions of DD-WRT  include  from Hotspot, IPv6, OpenVPN, PPTP, ProFTPD, SNMP, SSH, and Telnetd to a Samba/CIFS client. It has EoIP (Ethernet over IP, allowing you to bridge networks), VLAN, QoS, and advanced firewall (including the ability to block specific P2P networks).

OpenWrt has a package system for additional add-ons, It has everything from Squid, NTP, OpenVPN, CUPS (printing support), and lightHTTPD to an IRC server, Nagios (network monitoring), Asterisk (a VoIP server), and the Perl programming language. The only catch is that you will need a router with a sufficiently large amount of storage space and memory
 
To upgrade your router and make it more secure, I would recommend replacing the default firmware if you can. Make sure you check the compatibility lists!  
As stated in http://www.linux-magazine.com/w3/issue/119/048-049_kurt.pdf