Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have started up a vncserver on my home computer, running Ubuntu 10.10.

I enabled the ability for users to connect, and made it require a password

yesterday I tested this from Ubuntu by typing

vncviewer localhost:1

and I was able to see my desktop.

Now I am at work using CentOS and I type: vncviewer x.x.x.x:1 and I am unable to connect.

What should I do to allow for remote desktop over the internet to my home computer? I'd also settle for just being able to get to a terminal on my home computer if the full desktop is not recommended. Thanks!

edits:

CentOS machine is over the internet. Networking setup at home is the computer is connected directly to DSL modem.

share|improve this question
    
x.x.x.x isn't a valid IP address ;) But seriously - you haven't given us enough information. Where is the CentOS machine in relation to the Ubuntu one? What is your networking setup? Please give us more clues to help you with. –  Majenko Mar 31 '11 at 15:18
    
Edited post: basically the ubuntu install is right out of the box, and i followed these instructions: ehow.com/how_5089245_install-vnc-server-ubuntu.html –  Derek Mar 31 '11 at 15:27
    
@Matt: But it is a valid DNS name. –  grawity Mar 31 '11 at 16:16
    
@grawity :P~~~~ –  Majenko Mar 31 '11 at 16:42

2 Answers 2

This probably won't work. Unless you have a static IP address, you will not be able to connect to a home network using normal means. You could use a service like FreeDNS or DynDNS. There is a nice tutorial about how set up a system like this. I don't think you need to actually buy a domain though, I think you can camp on someone else's. Anyway, here's what happens:

  • Your IP address can change frequently
  • Your computer will talk to FreeDNS and tell it when it's IP changes
  • FreeDNS will route all traffic to your computer

When you get this set up, you will need use a command like this:

vncviewer yourdomain:port where yourdomain is the domain registered through FreeDNS or DynDNS and port is the port your vnc server is running on.

It's not too complicated... I set this up in an afternoon and I can access my desktop from anywhere.

share|improve this answer

To make incoming connections, you usually have to set up port forwarding in your home network's router. For VNC, it's TCP ports 5900+n, where n is the display number. For :1, it would be 5901.


However, since VNC lacks any security measures (beyond an optional password which is sent in plain text), it would be more secure to tunnel the connection over SSH.

Install openssh-server on Ubuntu, forward the SSH port tcp/22 instead of VNC, and connect from CentOS with:

ssh -fNL 5911:localhost:5901 ubuntubox.domain.tld
vncviewer localhost:11
share|improve this answer
    
Before you ask: The "DSL modem" is in fact a router (with DSL support). –  grawity Mar 31 '11 at 15:32
    
I will keep this in mind for later. RIght now the ubuntu box is connected directly to DSL modem –  Derek Mar 31 '11 at 15:33
    
Ninja edited! haha –  Derek Mar 31 '11 at 15:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.