From d517abb6e45858ba170a6239e7d8f54b00f7cddb Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 8 Aug 2022 09:30:52 +0200 Subject: [PATCH] fix issue #2: detect remote an dynamic port forwarding Not just local port forwarding. --- tunnelmon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tunnelmon.py b/tunnelmon.py index 223e980..d7d20e6 100755 --- a/tunnelmon.py +++ b/tunnelmon.py @@ -146,7 +146,7 @@ class TunnelsParser: # only a list of connections OR autossh processes # self.update() - self.re_forwarding = re.compile(r"-L\s*(\d+):(.*):(\d+)") + self.re_forwarding = re.compile(r"-\w*[LRD]\w*\s*(\d+):(.*):(\d+)") self.header = 'TYPE\tSSH_PID\tIN_PORT\tVIA_HOST\tTARGET_HOST\tOUT_PORT'