QUOTE
For xinitd, use the cps,instances,max_load and per_source keyworks
CODE
/etc/xinetd.conf or /etc/xinetd.d/myservice
CODE
service myservice
{
....
cps = 10 30
# Limit to 10 connections per secont if the limit is exceeded sleep for 30 #seconds.
instances = 4
#limit to 4 concurrent instances of myservice
per_source = 2
#limit 2 simultaneous sessions per source ip address Specify UNLIMITED for no #limit, the default
max_load = 3.0
#Rejects new request if the on-minite system load average exceds 3.0
}
{
....
cps = 10 30
# Limit to 10 connections per secont if the limit is exceeded sleep for 30 #seconds.
instances = 4
#limit to 4 concurrent instances of myservice
per_source = 2
#limit 2 simultaneous sessions per source ip address Specify UNLIMITED for no #limit, the default
max_load = 3.0
#Rejects new request if the on-minite system load average exceds 3.0
}
I highly recommend editing this to what you feel safe with for your server.