Need to limit number of logins by IP address on server (long).

From: Chladek, Dave (Dave.Chladek@NHMCCD.EDU)
Date: Tue Sep 24 2002 - 11:55:40 EDT


Hey guys, I'm in a bit of a pickle here and I hope, but doubt, that someone
else has already invented this wheel. My administration wants to limit the
number of sessions, a single user can have at any given time, to a specific
number of concurrent telnet sessions per user id/login. This number can be
from 1 to 10 but the kicker is... only if they are coming from the same IP
number.

I currently have a process that reads a file and checks the number of
sessions they are currently logged into and gently notified them if they are
exceeding it but it does not check to make sure they are from the same IP
address. It sounds easy but I'm unsure of how to approach this. I was
thinking of writing to a flat file each time the user logs in specific
information using the 'who -m' command which logs the login id, tty, date &
time and IP address for that session. Then I would compare with any
previous login IP address and if it's OK then write it and allow them to log
in. When they log out of the system, it would remove the specific
information from the flat file and use this as a check. I think I'm over
complicating this process and looking for any suggestions.

Many, Many 'Thanks' in Advance,

Dave Chladek
UNIX Systems Administrator
North Harris Montgomery Community College District
250 N. Sam Houston Pkwy E. Suite 105B
Houston, Tx 77060-2000
Tel: 281-260-3527 Fax: 281-260-3101
Email: dave@nhmccd.edu



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:13 EDT