PDA

View Full Version : Limit IRC Connections?


utkyle
02-21-2005, 22:33
omg the forum ate my post@*!#*! :mad:

I recently got a box with FreeBSD 5.2.1 on it. I am wanting to use it as a box to bounce my connection on irc, and give a few friends access to it. But I don't want them to be able to abuse it.

Basically, I want to limit the ammount of irc connections/processes they can have. Being on several shell providers before, I have seen this done two ways. One, on the motd when a user logs in, it displays Active IRC Connections and the limit. This apparently limits based on irc connections/any connection below 10000 (as it counted the connection to a hub bot that was on a port below 10000), and processes are then killed based on IRC connections (looks like it prevents those bots which run multiple connections with one process, or bnc's that connect more than once). The other one seemed to be a strict process limit, killing processes over this limit & sending an email to the user. This did not count processes like bash, compiling, etc.

I tried adding a class to /etc/login.conf (yes i ran the thing to make it login.conf.db every time i edited it). In the class I created, I set maxproc to the number of irc connecting processes the user is limited to, but this prevented some programs from running, and it wasn't possible to even compile, since this appears to be a hard limit. I tried maxproc-cur and maxproc-max, but got similar results.

Not sure how shell providers limit their users, wether its a script, program, or something in FreeBSD that I just haven't looked at yet (Google told me it dosnt like me anymore after I searched for FreeBSD...).

I sound like a newbie again :(

Thanks for any help!
Kyle -Linux <3, FreeBSD Noob

I am at work right now, if anyone wants to help me with this over live chat, I will be home in an hour.
aim: TribuneKyle
msn: omgporn@phreaker.net
irc: FelixX @ EFNet