Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to set limit, often fork bomb myself
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MHL
Apprentice
Apprentice


Joined: 15 Jun 2004
Posts: 197

PostPosted: Mon May 16, 2005 6:18 pm    Post subject: how to set limit, often fork bomb myself Reply with quote

Hi all,

often when I code something, I unintended fork bomb my self,
is any way to set it to immuse the system from DoS?

thank you very much
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon May 16, 2005 6:36 pm    Post subject: Reply with quote

Code:

ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) 32
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1024
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 6336
virtual memory        (kbytes, -v) unlimited


xming
_________________
http://wojia.be
Back to top
View user's profile Send private message
Sloden
Tux's lil' helper
Tux's lil' helper


Joined: 30 Dec 2004
Posts: 93
Location: Nidaros: Card Board Box, Second Floor

PostPosted: Mon May 16, 2005 8:59 pm    Post subject: Reply with quote

Could you for simplicity provide us with your /etc/security/limits.conf? :)
_________________
Screenshot of the month
Back to top
View user's profile Send private message
Sloden
Tux's lil' helper
Tux's lil' helper


Joined: 30 Dec 2004
Posts: 93
Location: Nidaros: Card Board Box, Second Floor

PostPosted: Tue May 17, 2005 10:38 pm    Post subject: Reply with quote

*Bumping* this thread to get it some front page attention. :) I still need an effective /etc/security/limits.conf, which doesn't intervene with normal use. I simply hate DoS'ing myself :)
_________________
Screenshot of the month
Back to top
View user's profile Send private message
sn4ip3r
Guru
Guru


Joined: 14 Dec 2002
Posts: 325
Location: Tallinn, Estonia

PostPosted: Tue Jun 21, 2005 11:30 pm    Post subject: Reply with quote

Sloden wrote:
*Bumping* this thread to get it some front page attention. :) I still need an effective /etc/security/limits.conf, which doesn't intervene with normal use. I simply hate DoS'ing myself :)


I'm not a security expert but I think this should be effective against "fork bombs":
Code:
your_username soft nproc 180
your_username soft nproc 200


You may ofcourse raise the limits if 180 processes per-login is not enough for you.
PS. I have no idea how /etc/security/limits.conf works with X11 programs, but for shell logins it works fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum