You are not logged in.

#1 2009-04-09 15:47:40

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

tightvnc

Hi,

I am slowly getting my server up & running trying to get tightvnc working locally [server!] I can get viewer to work but on remote I get Unable to connect to VNC server

What am I doing wrong? are there any guides to setting up tightvnc?

MrG


Mr Green

Offline

#2 2009-04-09 15:55:04

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: tightvnc

tightvnc is a viewer, x11vnc is the server.  i believe we have wikis on both.

edit: i _thought_ tightvnc was a only a viewer.  learn somethin new everyday.  also, ssh tunnels ftw.

Last edited by brisbin33 (2009-04-09 17:35:42)

Offline

#3 2009-04-09 15:59:09

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: tightvnc

I use tightvnc for a server with a ssh tunnel.  To set it up, ssh to your remote server using:

ssh -L 5901:127.0.0.1:5901 user@server
vncserver

Then, leaving the ssh connection open, open your viewer (I use vinagre) and connect to server=localhost, port=5901.

Offline

#4 2009-04-09 16:21:26

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: tightvnc

ok .... that looks better should explain I am viewing over a lan [did read wiki!]

mrgreen [server] is 192.168.0.3

mrgreen [viewer] is 192.168.0.4

vinagre emmm ok


Mr Green

Offline

#5 2009-04-09 19:26:43

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: tightvnc

Cannot seem to access local.... vinagre wants to port 5800/5900 open I do not want to expose my network to the web

Is there a way to connect to vnc on local network?

MrG


Mr Green

Offline

#6 2009-04-13 21:40:44

derelict
Member
Registered: 2006-07-25
Posts: 81

Re: tightvnc

The easiest way I know of is to use ssh. Leave the required vnc ports open on the local box (but blocked at the firewall) and redirect your traffic through an ssh tunnel. The Arch wiki has a useful example of allowing loopback connections using iptables here: http://wiki.archlinux.org/index.php/Sim … aces_chain.

The following script is one that I use on a daily basis.

#!/bin/sh
#
ssh -C -f -L 5903:localhost:5902 192.168.0.41 sleep 10; \
vncviewer -encodings "hextile" localhost:3

I adapted it from here: http://www.g-loaded.eu/2006/11/24/auto- … h-tunnels/ and here: http://www.g-loaded.eu/2005/11/10/confi … in-fedora/
The vncserver shouldn't matter. Just allow it to listen on the default ports and then use the ssh tunnel to secure the session.

Offline

#7 2009-04-14 05:22:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: tightvnc

I managed to get logged into vnc session in the end, [cannot quite remember how!]  your script would work but I really do not want to port forward just for local network.

Still testing out server stuff as its new to me, got to sort out xstartup now

Will read up on the links you give... am interested in the stuff and of course if I need to -Syu my system from somewhere else wink


Mr Green

Offline

#8 2009-04-15 18:17:19

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: tightvnc

Ooh I need some help with this, I have been trying to get mine working but am pretty doggone confused now lol. My setup is my server and desktop. Currently I am able to ssh back and forth between the two just fine, and I have a regularly used alias in bash to SSH into my server from desktop:

alias sshmyth='ssh -Y -L 5900:127.0.0.1:5900 serverusername@192.168.1.100'

I can also VNC into my server from the desktop with this running on the server:

x11vnc -display :0 -ncache 10 -localhost -loop

And vnc in using this:

vncviewer -truecolour -quality 9 127.0.0.1:5900

Now, I can SSH into my desktop from anywhere (and do so daily from Vista laptop @ office using putty) with the ip and port 22. However, I cannot SSH or VNC into my server, remotely. (And I have tried using vncviewer and no-ip redirect with port 59xx). That's what I'd like to do and am a bit confused, I would really appreciate any help, thanks.

(If more configs/info needed from me I will post of course! smile)

Last edited by colbert (2009-04-15 18:18:51)

Offline

#9 2009-04-15 19:57:47

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: tightvnc

Any output from a terminal may help..... got mine working on local network [took awhile!]


Mr Green

Offline

Board footer

Powered by FluxBB