Click to See Complete Forum and Search --> : VNC/ssh/port forwarding howto???
pwhitdog
11-24-2003, 06:17 PM
Hello everyone,
I have a computer that is behind a firewall that I would like to do a vnc over ssh to and I am not sure how to do it. I am honestly a little confused by the setup example in the NHF, so I was wondering if someone could give me a step by step way to do it? All help is greatly appreciated and welcome. Thank you for your time and effort,
Paul
Gertrude
11-26-2003, 04:36 AM
I'm not quite sure I understand your question..
First off what kind of firewall are you behind? Is it using iptables, ipchains, IPFW? or is it a SOHO Linksys/netgear/D-link router?,
What OS is running on your computer?
Are you trying to set this up so another computer can connect to this one? Or so this computer can connect to another computer?
What OS is running on the remote computer?
nextbillgates
11-26-2003, 05:04 AM
For VNC over SSH, you only need to forward the SSH port (TCP 22).
pwhitdog
11-26-2003, 11:00 AM
sorry I didn't specify. Basically I am running 3 linux boxes. The firewall is a Mandrake multi-network firewall. Basically I have my home base computer behind that I would like to VNC over ssh into and a laptop running linux that would be the VNC client. I would also like to have a way to port forward so when I ssh into the home computer I don't have to ssh into the firewall and then into the home computer. I will of course need to be able to ssh into the firewall from time to time.
Thanks for helping I appreciate it,
Paul
hlrguy
11-26-2003, 11:25 AM
How I use VNC over ssh.
http://www.justlinux.com/forum/showthread.php?s=&threadid=106184&highlight=vnc+ssh
http://www.justlinux.com/forum/showthread.php?s=&threadid=88262&highlight=vnc+ssh
hlrguy
nextbillgates
11-26-2003, 12:35 PM
Originally posted by pwhitdog
sorry I didn't specify. Basically I am running 3 linux boxes. The firewall is a Mandrake multi-network firewall. Basically I have my home base computer behind that I would like to VNC over ssh into and a laptop running linux that would be the VNC client. I would also like to have a way to port forward so when I ssh into the home computer I don't have to ssh into the firewall and then into the home computer. I will of course need to be able to ssh into the firewall from time to time.
Thanks for helping I appreciate it,
Paul
Just forward port 22 to your home computer, make your tunnel, and VNC should work.
pwhitdog
11-26-2003, 04:59 PM
Am I wrong or if I port forward that port then I cannot ssh into the firewalL?
nextbillgates
11-26-2003, 05:16 PM
Originally posted by pwhitdog
Am I wrong or if I port forward that port then I cannot ssh into the firewalL?
You can just run SSH on another port.
hammer123
11-26-2003, 07:25 PM
step 1 start ssh using the -l switch to specify your login name and then set up forwarding of your local port 5902 to the remote server's port 5901 and enable compression with the -C switch then specify the remote server you want to reach
$ssh -l yourloginnameontheremotecomputer 5902:ipaddressorhostnameofremotecomputer:5901 -C ipaddresssorhostnameofremotecomputer
so for example if I wanted to log into just linux
$ssh -l hammer123 5902:www.justlinux.com:5901 -C www.justlinux.com
step 2 start up a vnc server on the remote server on port 5901 of the remote computer if you dont have it yet
$vncserver :1
step 3 start up a vnc client on the local computer and direct it towards local port 5902 with high compression and full screen
$vncviewer -compresslevel 0 -fullscreen :2
step 4 type in the appropriate password (usually root or the same as the user that initiated the vncserver) when prompted and enjoy