LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-28-2005, 08:39 AM   #1
clickster
LQ Newbie
 
Registered: Dec 2004
Posts: 22

Rep: Reputation: 15
tunneling vnc over SSH


Hello. I am putting this question in the networking area because I think it is probably a firewall issue. Here is the my general network layout:

I have a static IP (we'll say 200.200.200.200) that has a domain name pointed to it (let's say system.domain.com). The system is behind my home DSL router (which has the static IP) with port 22 forwarded to it so that I can SSH into it (it is an FC3 box). That box has a NATed internal IP (we'll say 10.10.10.10). vncserver is running on :1.


Now, when I am at home, I use Putty on my Windows laptop to SSH to 10.10.10.10 with a tunnel from local port 5901 to 10.10.10.10:5901. I am then able to open a VNC client and connect to the server as localhost:1.

However, this is where I run into problems. Whether I am at home behind my router or on the road somewhere, I can still SSH into my system without issue but SSHing to system.domain.com, but VNC never connects as localhost:1. Am I missing something? Does VNC use another port even when tunneling over SSH?
Also, if it is a firewall issue, shouldn't I still be able to get to it from behind my firewall by going to system.domain.com? I would think DNS would resolve the name and my router would realize that both the source and destination computers were behind it and bypass the firewall?

On a side note, I apologize for my love of parenthesis. Thank you in advance for any assistance.
 
Old 06-28-2005, 11:24 AM   #2
peter_robb
Moderator
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
So you are connecting with ssh -L 5901:127.0.0.1:5901 system.domain.com
then telling vncviewer to connect to 127.0.0.1:5901 ?
 
Old 06-28-2005, 12:05 PM   #3
clickster
LQ Newbie
 
Registered: Dec 2004
Posts: 22

Original Poster
Rep: Reputation: 15
That's correct. I'm using PuTTY for SSH, but that would be the command line equivalent.
 
Old 06-28-2005, 12:48 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: Kennesaw, GA
Distribution: Ubuntu
Posts: 8,502

Rep: Reputation: 110Reputation: 110
I've personally done that before and it worked fine then.
 
Old 06-28-2005, 12:50 PM   #5
peter_robb
Moderator
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
I'm just not too sure about the Putty setup..
Worth investigating though..
 
Old 06-28-2005, 12:54 PM   #6
javaroast
Member
 
Registered: Apr 2005
Posts: 130

Rep: Reputation: 18
In the tunnels section put 5901 in the source port and in destination put localhost:5901. Save your profile. In VNC you should connect to localhost:1. Personally I start vncserver with vncserver :1 -localhost. This prevents logins outside of the tunneled connections and prevents the vncserver from hack attempts.
 
Old 06-28-2005, 01:14 PM   #7
clickster
LQ Newbie
 
Registered: Dec 2004
Posts: 22

Original Poster
Rep: Reputation: 15
I'll give that a try tonight. I just don't understand why it works perfectly until I go through the firewall. Since I'm tunneling, the only port I should need open is 22.
 
Old 06-28-2005, 01:21 PM   #8
clickster
LQ Newbie
 
Registered: Dec 2004
Posts: 22

Original Poster
Rep: Reputation: 15
THANK YOU!!! Just tried it that way and it worked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tunneling thru ssh c9876543210 Linux - Networking 1 07-21-2005 12:45 AM
SSH tunneling X AzZuM Linux - Security 3 11-27-2004 01:59 AM
VNC tunneling -- so close! makhand Linux - Networking 1 09-14-2004 10:51 PM
VNC with ssh tunneling problem. spatemp Linux - Networking 1 02-05-2002 08:54 AM
tunneling with ssh barbanero Linux - Security 2 01-24-2002 10:53 AM


All times are GMT -5. The time now is 01:38 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration