From 1ff0a623db5a3d8a686a68880ad283d9d451ae57 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:49 +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 42313538..4704d16c 100755 --- a/tunnel-server/src/udstunnel.py +++ b/tunnel-server/src/udstunnel.py @@ -222,6 +222,7 @@ def tunnel_main(): while not do_stop: try: client, addr = sock.accept() + client.settimeout(3.0) logger.debug('ACCEPTED CONNECTION from %s (%s)', addr, client) # Select BEST process for sending this new connection prcs.best_child().send((client, addr))