Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restrict teh number of telnet sesion in specific ethernet port.

Status
Not open for further replies.

MyFinalJourney

IS-IT--Management
Sep 19, 2003
16
0
0
TR
Hi maestroes

One question. Is it possible to restrict the number of telnet sessions on the specific ethernet port. I have two ethernet port, first is dedicated one network, second to another. i just want to restrict to concurrent log-in user number in an ethernet. is it possible?

KInd regards

cheers
 
Put something like this in /etc/profile perhaps:

Code:
if [ `netstat -f inet -n | nawk '$4 = "1.2.3.4.23"' | wc -l` -gt 1 ]
then
        echo There is already a telnet connection open on this port.
        exit 1
fi

Obviously replace 1.2.3.4 with the IP address of the port you want to restrict the logins on.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top