Tunnelling RealVNC over a firewall with OpenSSH
Occasionally, I will use RealVNC to connect to my machine back home. And then, something strange started happening. I wasn't able to connect to my machine back home using VNC. I thought it could be a firewall block, so I decided to set up a SSH server at home. After scouting around, I came upon OpenSSH. I downloaded it and installed it.
Here's how I set it up on the server.
- Created 2 users, unknown1 and unknown2.
- Host restrictions: Allow only these IP addresses and entered specific IP address.
- Disable telnet command shell, and SSH command shell, by pointing to an invalid file
- Tunnelling: Allow both local and remote port forwarding.
On the client, I ran putty and connected to my SSH at home.
In the client, I enabled SSH port forwarding so that it listened to port xxxx and forwarded to my server's yyyy port. I then connected VNC to 127.0.0.1's xxxx port, which putty then forwarded to the OpenSSH's server's yyyy port, which my RealVNC server is listening on.