From dc12d6e430655070af4a9d32c862667c91728ede Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Wed, 16 Sep 2020 16:11:28 +1000
Subject: [PATCH] bind on ipv4 not 6

---
 tes/sshwrapper/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tes/sshwrapper/__init__.py b/tes/sshwrapper/__init__.py
index 2e3b95b..f3f54b7 100644
--- a/tes/sshwrapper/__init__.py
+++ b/tes/sshwrapper/__init__.py
@@ -409,7 +409,7 @@ class Ssh:
             # port forward to the batch node
             sshcmd = Ssh.SSHCMDWITHOPTS.copy()
             sshcmd.extend([
-                      '-L', '{localport}:{batchhost}:{port}'.
+                '-L', '127.0.0.1:{localport}:{batchhost}:{port}'.
                       format(port=port, localport=localport, batchhost=batchhost),
                       '-O', 'forward', '-S', ctrlsocket,
                       '-p', sshport, '-l', user, host])
@@ -424,7 +424,7 @@ class Ssh:
             sshcmd = Ssh.SSHCMDWITHOPTS.copy()
             sshcmd.extend([
                 '-o', "ProxyCommand={}".format(proxycmd),
-                      '-L', '{localport}:localhost:{port}'.
+                      '-L', '127.0.0.1:{localport}:localhost:{port}'.
                       format(port=port, localport=localport),
                       '-p', sshport, '-l', user, batchhost])
 
-- 
GitLab