I had at home an NAS and in the datacenter a Server. I make an SSH Tunnel with the following command:
autossh -fN -M20404 -R 1337:localhost:22 user@server
(from the nas to the server) Its working and I can access the NAS. Now, I want access the munin-node, also I make a new tunnel from the server to the nas:
ssh -N -R 49499:localhost:4949 localhost -p 1337
but if I make an nmap localhost -p 49499 the port is closed and i cant access the munin-node.
I don't know why and I am very happy about your help.
If you would like to access your munin-node running on your NAS from your server, you should use in your
ssh
command a direct port forwarding with-L
instead of a reverse port forwarding with-R
:On the NAS:
On the server:
Then from your server,
telnet localhost 49499
should connect to your munin-node on the NAS.If you don't need your
autossh
command for something else, you could simplify everything with only one command on your NAS:Then again on the server, you can access the munin-node of your NAS with
telnet localhost 49499
as well, through the SSH tunnel.