Gentoo Archives: gentoo-user

From: Mark Shields <laebshade@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH)
Date: Tue, 10 Oct 2006 17:41:40
Message-Id: 642958cc0610101033h5d37d0cfh48367ea964f2db3@mail.gmail.com
In Reply to: Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH) by Richard Fish
1 On 10/10/06, Richard Fish <bigfish@××××××××××.org> wrote:
2 >
3 > On 10/10/06, Mark Shields <laebshade@×××××.com> wrote:
4 > > I have a gentoo box setup as a router with 3 servers behind it (all 4
5 > > servers are running gentoo). Right now I simply have port 5901 to
6 > forward
7 > > from the router to my vnc server so I can access it remotely. I've
8 > looked
9 > > on the gentoo forums and online but haven't been able to find any solid
10 > > information on how to tunnel 5901 through ssh through the router to the
11 > vnc
12 > > server. Basically, client -> router -> vnc server port 5901, but over
13 > ssh.
14 > > Any ideas?
15 >
16 > You want ssh port forwarding....you can read the ssh man page, but
17 > basically you want:
18 >
19 > # ssh -L localhost:5901:remotehost:5901 &
20 > # vncviewer localhost:5901
21 >
22 > HTH,
23 > -Richard
24 > --
25 > gentoo-user@g.o mailing list
26 >
27 >
28 Thank you Richard and Mauro, but this wasn't what I was looking for. The
29 vnc and the ssh server are not the same. I am familiar with and have no
30 problem using the particular setup you mention; however, it will not work
31 for what I want to accomplish. I want to tunnel vnc traffic over ssh to my
32 router, then forward that vnc traffic to the actual vnc server. I think the
33 problem lies somewhere in my iptables rules. I did have: /sbin/iptables -t
34 nat -A PREROUTING -p TCP --dport 5901 -i ${WAN} -j DNAT --to
35 192.168.0.235:5901 , which will forward it correctly if I connect through
36 5901, but tunneling via SSH doesn't work. Again, I want to tunnel the vnc
37 connection to the router, which will then forward the port 5901 traffic to
38 the vnc server.
39
40 Btw, I'm using Putty and Tightvnc on a WinXP machine (work PC) to connect to
41 the vnc server.
42
43 --
44 - Mark Shields

Replies

Subject Author
Re: [gentoo-user] VNC over SSH (VNC session is non-local to SSH) Richard Fish <bigfish@××××××××××.org>