0
I'm using a reverse SSH tunnel on Debian with openssh-server and autossh: something like -R 1234:localhost:22
with a monitoring port also set.
Generally, it works well, but I'm having the following problem: the tunnel opens and I see my remote server listening on 127.0.0.1:1234
. But as soon as I try to establish a connection to this address:port, I get a "Connection refused" message and the port closes until autossh reopens it.
I have another tunnel, a -L
. It sends its logs to this remote server. This tunnel seems to work as I'm receiving logs.
Anyone would have an idea of what's happening?
do you have anything like a misconfigured snort or failban or iptables rules that could get in the way? Do you have a service already listening on 1234? Your
-R
command is definitely good so there's something else getting in the way. – zmo – 2014-03-05T20:41:44.210Looking at the informations I have now, it looks very strange. This machine opens a few tunnels: -D (socks), -L (local) and -R (remote). All the -R tunnels won't work. I already ran some tests with fail2ban off or iptables ... – user305368 – 2014-03-05T20:47:56.430