There are a few way to do it: 1) NAT/PAT the vnc traffic from your linux server to the internal PC directly. 2) ssh tunnel vnc traffic though your linux NAT box. For option (2), on the remote vnc viewing machine: ssh -g -L 5901:pc_ip_add:5901 linux_server_ip This command syntax works for both openssh.org/ssh.com client. you can now connect your vnc viewer to localhost:1 Change the port numbers accordingly if your screen number is'nt :1. All traffic now are tunnelling through the ssh connection. No screen number conflicts should occur. Optionally you enable compression with -C flag in ssh. --- "Scot L. Harris" <webid@xxxxxxxxxx> からのメッセージ : > On Fri, 2004-05-14 at 12:58, Gustavo Rahal wrote: > > Hi > > > > How to change the port vncserver is running? > Actually, I don't know if > > the port change is something to do with X or vnc. > > The situation is that I want to access my PC that > is inside a home > > network (there is a server doing NAT with > iptables). I already have > > access to the server from outside but I would like > to access my computer > > (ip 192.168.....) so I imagine that I would have > to do a port forward to > > my PC, is that right? Since the server is already > running vncserver I > > have to forward different ports... > > > > Appreciate any help > > If you are already using ssh to access the server > from outside then > setup an ssh tunnel. I did this using putty on the > laptop. Under the > ssh settings setup an entry specifying a local port > (such as 5905) that > is mapped to your servers IP address and port 5901. > Then when you > connect via ssh the tunnel is setup for you. Then > run vnc using > localhost:5 for the machine you are trying to > connect to. This will > cause the vnc session to be routed via the local > port 5905 to the ssh > tunnel which ends up on the remote server. vnc > assumes the port starts > at 5900 so when you use :5 it actually hits port > 5905 on your local > machine. > > Have been using this for some time now. Nothing to > setup on the remote > server except to have vnc listening on the default > port. > > Check out the vnc web site. It think that is where > I found the > information to set this up. > > There were two parts that were a little confusing. > When you setup the > ssh tunnel that establishes a tunnel directly from > your machine to the > remote server. So you need to use the actual IP > address on the remote > machine to define its end of the tunnel. The other > part that was a > little confusing was how to get vnc to use a > specified port. Instead of > spelling out the whole thing it adds 5900 to the > value you put after the > colon. > > Hope that helps and did not muddy the waters more. > > -- > Scot L. Harris <webid@xxxxxxxxxx> > > > -- > fedora-list mailing list > fedora-list@xxxxxxxxxx > To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list __________________________________________________ Do You Yahoo!? http://bb.yahoo.co.jp/