nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

Limiting Irc connections

This is a discussion on Limiting Irc connections within the Ubuntu / Debian forums, part of the Linux Distribution category; 1. Does any one have clue idea how can i see how many connections a ssh user is using in ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Linux Distribution > Ubuntu / Debian

Linux answers from nixCraft.


Ubuntu / Debian Discussion about Debian or Ubuntu Linux related problems.

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 18th February 2010, 06:55 PM
Junior Member
 
Join Date: Feb 2010
OS: Ubuntu 9.04
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
ProfiMK is on a distinguished road
Post Limiting Irc connections

1. Does any one have clue idea how can i see how many connections a ssh user is using in the moment?
2. Does any one have some script that is limiting the irc connections per user, or any knowledge how to control them ?
Reply With Quote
  #2 (permalink)  
Old 18th February 2010, 07:39 PM
kumarat9pm's Avatar
Senior Member
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL(4/5),UBUNTU..
Scripting language: Bash,PHP,Perl(noob)
Posts: 621
Thanks: 30
Thanked 38 Times in 34 Posts
Rep Power: 8
kumarat9pm is just really nicekumarat9pm is just really nicekumarat9pm is just really nicekumarat9pm is just really nicekumarat9pm is just really nice
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

Q1)
who -r
or
watch "lsof -i | grep ssh"

Q2)
you can limit no of connections using maxlogins option in /etc/security/limits.conf
__________________
Thanks,
Surendra Kumar Anne
Linux: Fast, friendly, flexible and .... free!
Support Open source.
http://www.linuxnix.com
Reply With Quote
The Following User Says Thank You to kumarat9pm For This Useful Post:
ProfiMK (19th February 2010)
  #3 (permalink)  
Old 19th February 2010, 01:50 AM
Junior Member
 
Join Date: Feb 2010
OS: Ubuntu 9.04
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
ProfiMK is on a distinguished road
Smile

Quote:
Originally Posted by kumarat9pm View Post
Q1)
who -r
or
watch "lsof -i | grep ssh"

Q2)
you can limit no of connections using maxlogins option in /etc/security/limits.conf
Q1 the both of commands are not showing me any connections that are on, should i install something?
Q2 maxlogins will restrict how many connections are going out on irc, or just from how many ip's can login on shell @ same time, or both?

Last edited by ProfiMK; 19th February 2010 at 02:54 AM.
Reply With Quote
  #4 (permalink)  
Old 19th February 2010, 09:06 AM
kumarat9pm's Avatar
Senior Member
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL(4/5),UBUNTU..
Scripting language: Bash,PHP,Perl(noob)
Posts: 621
Thanks: 30
Thanked 38 Times in 34 Posts
Rep Power: 8
kumarat9pm is just really nicekumarat9pm is just really nicekumarat9pm is just really nicekumarat9pm is just really nicekumarat9pm is just really nice
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

Code:
[root@test ~]# lsof -i | grep ssh
sshd       2548   root    3u  IPv6   5505       TCP *:ssh (LISTEN)
sshd      16070   root    3u  IPv6 281966       TCP test.example.co.in:ssh->abc.example.co.in:36533 (ESTABLISHED)
if your lsof -i | grep ssh if its not showing any thing means.. there is no ssh connections at all..


the limits file which i mention is to where the connections are established.. not from where..

Can i have following details for understanding..?
1)if i have a client and server(irc provider).. where you want to restrict users? is it on server side or client side?
__________________
Thanks,
Surendra Kumar Anne
Linux: Fast, friendly, flexible and .... free!
Support Open source.
http://www.linuxnix.com
Reply With Quote
  #5 (permalink)  
Old 19th February 2010, 10:47 AM
Junior Member
 
Join Date: Feb 2010
OS: Ubuntu 9.04
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
ProfiMK is on a distinguished road
Default

I want to limit the connections that shell user will use to irc server. For ex. eggdrops i restric by limiting the process number, but psybnc is taking only 1 process but from it, thay can make a lot of connections on irc. And that is what i want to limit the outgoing connections.

Last edited by ProfiMK; 20th February 2010 at 12:39 PM.
Reply With Quote
  #6 (permalink)  
Old 20th February 2010, 12:41 PM
Junior Member
 
Join Date: Feb 2010
OS: Ubuntu 9.04
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
ProfiMK is on a distinguished road
Default

Quote:
Originally Posted by kumarat9pm View Post
Code:
[root@test ~]# lsof -i | grep ssh
sshd       2548   root    3u  IPv6   5505       TCP *:ssh (LISTEN)
sshd      16070   root    3u  IPv6 281966       TCP test.example.co.in:ssh->abc.example.co.in:36533 (ESTABLISHED)
if your lsof -i | grep ssh if its not showing any thing means.. there is no ssh connections at all..


the limits file which i mention is to where the connections are established.. not from where..

Can i have following details for understanding..?
1)if i have a client and server(irc provider).. where you want to restrict users? is it on server side or client side?
1) and yes i want to limit the client for how many connections to irc server can use
Reply With Quote
  #7 (permalink)  
Old 20th February 2010, 01:47 PM
nixcraft's Avatar
Never say die
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash, Perl, Python
Posts: 3,195
Thanks: 13
Thanked 394 Times in 292 Posts
Rep Power: 10
nixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond repute
Default

Try iptables which will restrict outgoing IRC connections.
__________________
Vivek Gite
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Do you run a Linux? Let's face it, you need help!
Cricket & IPL News Blog
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Limiting a directory size vamsi CentOS / RHEL / Fedora 5 12th February 2010 07:42 PM
Multiple ADSL internet connections one pc one lan jritas Networking, Firewalls and Security 2 31st January 2010 10:47 PM
iscsi SAN connections lsysamc Ubuntu / Debian 4 10th April 2009 09:17 PM
Limiting RAMFS usage sathiya Getting started tutorials 1 28th March 2008 09:11 AM
Postgres idle connections kasimani Databases servers 1 14th May 2007 05:58 PM


All times are GMT +5.5. The time now is 08:55 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40