


Connection>SSH>Tunnels>Add new forwarded port.

Magic!įor PuTTY on Windows, you just need to configure your tunnels within the options: Now you can add something like -L 8835:127.0.0.1:8834 and simply press enter. This just shortcuts running as root, since that's often preferable for Kali Linux.ĮDIT: Also interesting, is that if you forget to use an option like the -L, you can still add it after the fact - even after you are connected via SSH.

Note that you can use the -L option as many times as you need to, for various ports. If you've setup VNC already, you should also be able to VNC to 127.0.0.1:5901. This means you should be able to access Nessus, for instance, by using https:/127.0.0.1:8835 in your browser, while connected over SSH. If you connect to 127.0.0.1:8835 on the machine your SSH client is running on, you will be forwarded to port 8834 on the remote server. The local port on the left, forwards to the remote port on the right. L = This is where our port forwarding happens. This can be done with both the Linux OpenSSH client and the Windows PuTTY client.įrom Linux, the key is to use the -L option: This means you can tell your SSH client to forward to these listening ports, and because the connections are sent over the SSH tunnel, they aren't blocked by the firewall. Once you've set your firewall to only allow port 22 for SSH, your applications should still be listening on the remote server, even though the firewall is blocking them. That's particularly important for VNC traffic, since it's not encrypted by default and the SSH tunnel will encrypt it for you. If you have a remote Kali server running an application like Nessus or VNC that you don't want open to the public, it's very simple to tunnel your traffic to this application over SSH.
