Page 1 of 1

Kill socket after x seconds

Posted: Fri Feb 07, 2020 7:22 pm
by ace16vitamine
Dear all,

we are communicating with clients over socket via

Code: Select all

accept connections on port 9999 with message blablabla

and

Code: Select all

read from socket xzy until
Now, if a client fails, or an attacker makes 10000000 sessions :cry: or whatever the socket is multiple times open... Is there a possibility to kill the idle sockets after 5 seconds? Or can I set a Timeout?

Thanks
Stef

Re: Kill socket after x seconds

Posted: Fri Feb 07, 2020 7:32 pm
by Klaus
Hi Stef,

well, that should be -> the sockettimeoutinterval :-)


Best

Klaus

Re: Kill socket after x seconds

Posted: Fri Feb 07, 2020 7:47 pm
by FourthWorld
Which OS is running on the server? If Linux I'd set up UFW to handle those DDOS concerns.

Re: Kill socket after x seconds

Posted: Fri Feb 07, 2020 9:00 pm
by ace16vitamine
Hey Klaus,
well, that should be -> the sockettimeoutinterval
cool, thanks!

@FourthWorld
If Linux I'd set up UFW to handle those DDOS concerns
Yes, I have iptables in front of the DMZ, but it can not hurt to develop the application with this feature too.