Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
To be sure I understand well: The autossh command is executed on the NAS, the ssh command is executed on the server, and the nmap command is executed on the NAS? Is the munin-node also on the server? – uloBasEI Apr 15 '12 at 11:43
autossh executed on the nas, ssh executed on the server, nmap executed on the server - munin-node runs on nas and the munin-server on the server :) – Dennis Wisnia Apr 15 '12 at 13:30
up vote 0 down vote accepted

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:

nas $ autossh -fN -M20404 -R 1337:localhost:22 user@server

On the server:

server $ ssh -N -L 49499:localhost:4949 localhost -p 1337

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:

nas $ autossh -fN -M20404 -R 49499:localhost:4949 user@server

Then again on the server, you can access the munin-node of your NAS with telnet localhost 49499 as well, through the SSH tunnel.

share|improve this answer
You are right! I am so stupid. Its so easy! Many thanks! – Dennis Wisnia Apr 15 '12 at 16:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.