diff --git a/tes/sshwrapper/__init__.py b/tes/sshwrapper/__init__.py
index 2e3b95b93bbc302e317d94e9e682ed462f65df6c..f3f54b7935d96646f9c6dcfdaffc7c8d20d7e0e2 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])