From 2f5f87e12226b632f07d2440153bc6e2401058f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 29 Mar 2022 13:08:34 +0200 Subject: [PATCH] added timeout to oppened tunnel to avoid possible DOS --- tunnel-server/src/udstunnel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tunnel-server/src/udstunnel.py b/tunnel-server/src/udstunnel.py index a0e54c49..95fe3169 100755 --- a/tunnel-server/src/udstunnel.py +++ b/tunnel-server/src/udstunnel.py @@ -230,6 +230,7 @@ def tunnel_main(): try: client, addr = sock.accept() logger.debug('ACCEPTED CONNECTION from %s (%s)', addr, client) + client.settimeout(3.0) # Select BEST process for sending this new connection prcs.best_child().send( message.Message(message.Command.TUNNEL, (client, addr))