I would like to use VNC (tightvnc server and some vnc clients) through a ssh tunnel. It’s not going over the internet, but I want that extra security.
Let’s say the vnc server is on 192.168.0.100 and listens on 5900.
When I create the ssh tunnel using “ ssh -L 5900:localhost:5900 user@192.168.0.100 ”, for some reason I can’t connect using vnc. However the tunnel works fine for any other traffic e.g. http.
If I create the ssh tunnel using “ ssh -L 5900:192.168.0.100:5900 user@192.168.0.100 ” it works fine even for vnc. The question is, is it secure this way??
I mean, in the first case the server gets the traffic through the tunnel and forwards it to “localhost:5900” but in the second case it forwards it to “192.168.0.100:5900” which is his own ip addr. Will the traffic in the second case be sent back to the switch with ip.src and ip.dst the same 192.168.0.100?
Sorry if this doesn’t make any sense 😅😅!
Click to Open Code Editor