Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Vnc over two connected tunnels

Post Reply
gleesonger
Posts: 7
Joined: 2008-04-24 08:37

Vnc over two connected tunnels

Post by gleesonger »

Hi im trying to set up a VNC with my home computer (vnc server) which is behind a NAT router and trying to connect to it from work (vnc client) also behind a NAT router.Both routers are paid for by work the flip side is that I don't have access to either therefore I cant set up port forwarding I do however have access to my college ssh server.Work and home run XP college runs Lunix running SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2.What I want to do is set up a permanent tunnel from home to college and then connect from work to college and have college route the traffic home.I'm using putty to create the tunnels.I however am find this difficult also not helped by the fact that I don't know how to use ssh.exe properly to set up the internal port forwarding on the college ssh server.Any help would be most appreciated.

Image

Thanks Ger.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Vnc over two connected tunnels

Post by redge »

[user=10936][/user] maybe can help you very experienced user and programmer of tools with SSH and VNC

actually, i'm beginner of SSH in the middle.
Last edited by redge on 2008-06-22 08:58, edited 1 time in total.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
mattice06082
Former moderator
Former moderator
Posts: 607
Joined: 2006-11-30 00:41
Location: Connecticut, USA

Re: Vnc over two connected tunnels

Post by mattice06082 »

I run an SSH server on the same machine as my VNC server and documented the setup [topic=5890]Tunnel VNC through SSH[/topic].
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: Vnc over two connected tunnels

Post by JDaus »

gleesonger wrote:Hi im trying to set up a VNC with my home computer (vnc server) which is behind a NAT router and trying to connect to it from work (vnc client) also behind a NAT router.
Two connections required:
  • *VNC Server* -------> SSH Server
    *VNC Client* ---------> SSH Server
The "Server" connection needs to create a "remote" SSH tunnel (plink.exe -R 5900:127.0.0.1:25900 server.address)
The "Client" connection needs to create a "local" SSH tunnel (plink.exe -L 25900:127.0.0.1:25900 server.address)

Connect to localhost:25900 with VNC
gleesonger wrote:What I want to do is set up a permanent tunnel from home to college and then connect from work to college and have college route the traffic home.
there are a few different applications out there that will install as a service, but none that i know of that are open source ...
gleesonger wrote:I don't know how to use ssh.exe properly to set up the internal port forwarding on the college ssh server.Any help would be most appreciated.
Remote ssh tunnels can often be turned off by addministrators ... this may be the case

hope this helps
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: Vnc over two connected tunnels

Post by JDaus »

a script i created some time back which will create and maintain an ssh connection

http://www.autoitscript.com/forum/index ... t&p=487347

a bit of shameless self promotion ... but hopefully this might help

if you need help with this, or anything else, let me know ... my rates are reasonable ... :-D
Last edited by JDaus on 2008-06-23 12:03, edited 1 time in total.
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
gleesonger
Posts: 7
Joined: 2008-04-24 08:37

Re: Vnc over two connected tunnels

Post by gleesonger »

Thanks very much for your response I'm currently trying to get it to work by running a Lunix version of Ultra's repeater on the server, but your way looks alot simpler.As for maintaining a constant ssh tunnel Ill use MyEn Tunnel.

Thanks again Ger.
Last edited by gleesonger on 2008-06-23 21:39, edited 1 time in total.
gleesonger
Posts: 7
Joined: 2008-04-24 08:37

Re: Vnc over two connected tunnels

Post by gleesonger »

Yes it works thank you so much for a good while I tried the idea of connecting two tunnels with plink I however used "plink -L..." for both tunnels so it never worked.One letter change and it all falls into place.

Current setup:

Server Side

Code: Select all

vnc server on default settings (listening to 5900)
plink running with arguments: plink.exe -R 5800:localhost:5900 server.address
Client Side:

Code: Select all

vnc viewer pointed at localhost:5500
plink running with arguments: plink.exe -L 5500:localhost:5800 server.address
The reason my ports are not the usuall is because I have the viewer\server on same computer for testing purposes.

Thanks again for your help.
Last edited by gleesonger on 2008-06-23 23:51, edited 1 time in total.
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: Vnc over two connected tunnels

Post by JDaus »

gleesonger wrote:Yes it works ... One letter change and it all falls into place.
It took me a while to learn the tricks i shared above, that ONE LITTLE *#$#^ LETTER .......

one comment, i would suggest you use a random(ish) port on the server to try and isolate it from being used by VNC (by someone else maybe) or having someone try to hack your VNC server.

I have used nemesis tunnel before, but have had a few troubles with stability (over a year ago now)

Please let us all know how it goes in a few months, if youv'e made improvements etc...

glad to have helped you solve your problem
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
Post Reply