www.thorko.de Thorsten Kohlhepp - Systems administrator | Remote Desktop support

 

Remote Desktop support behind a firewall

enable the following settings on the OpenSSH server on the server and the Home PC

GatewayPorts yes

 

Next open  the firewall port 7888 on server (in and out)

iptables -A INPUT -p tcp --dport 7888 -m state --state NEW -j ACCEPT
iptables -A OUTPUT -p tcp --sport 7888 -j ACCEPT

Start your vncserver on Home PC

On Linux use x11vnc or vino when you want to use your current desktop

Connect from your Home PC to Server and redirect the port you want to connect to

ssh -R 7888:localhost:5900 root@server

Keep this connection open as long as you want to work with your Home PC

On your Office PC do a port forwarding

ssh -L 5900:server:7888 root@server

On your Office PC use your vncviewer to connect to the desktop on Home PC

vncviewer localhost:5900