Page 1 of 1

Control guest through VNC

Posted: 11. Mar 2009, 02:29
by Fabre
I have been struggling with this for a couple of days now and after reading countless webpages on the subject, I still figure it out.

I am running a Linux guest (DSL) on a Windows XP host.

Guest 10.0.2.5
Host 192.168.10.15

The guest is running VNCserver and is able to connect to itself (vncviewer localhost:5901)

While I how to VNC to a machine on a same network, how do I connect to guest?

Is there a way of forwarding the port so 192.168.10:5901 will redirect to 10.0.2.5:5901?

Re: Control guest through VNC

Posted: 11. Mar 2009, 03:25
by Perryg
Fabre wrote:I have been struggling with this for a couple of days now and after reading countless webpages on the subject, I still figure it out.

I am running a Linux guest (DSL) on a Windows XP host.

Guest 10.0.2.5
Host 192.168.10.15

The guest is running VNCserver and is able to connect to itself (vncviewer localhost:5901)

While I how to VNC to a machine on a same network, how do I connect to guest?

Is there a way of forwarding the port so 192.168.10:5901 will redirect to 10.0.2.5:5901?
Is there a reason why you have the guest at 10.0.2.5?

I would put it in the same address block as you host. Also you can stop the guest and go into the settings of VBox and set the network for hosted interface and relieve a lot of your problems.

Re: Control guest through VNC

Posted: 11. Mar 2009, 04:10
by TerryE
Simple. You're using NAT so you need the read the section of the manual on Port Forwarding. You set up a forward -- say from host:15901 to guest:5901. Now to VNC onto the guest's 5901 post, you connect to Host:15901. OK, this means that you aren't using the default port, but so what?

The alternative to use Host IF, which is just as easy. It doesn't need port forwarding, but the VM is now fully open to your LAN as another host.

Re: Control guest through VNC

Posted: 12. Mar 2009, 20:49
by Fabre
Thanks guys.

I set the network to use host IF and got the VNC working.
Now I just need to figure why I can't access my router ssh server from outside the LAN, but that's not related to Virtulbox.

Re: Control guest through VNC

Posted: 1. Apr 2009, 15:13
by jsh123
Just wondering how you got VNC to connect to the Guest. I am using the host if. I can http and ftp to the guest with the host if 192.168.1.104.

I can vnc from the guest to the guest 192.168.1.104:5903 so the server is running on the guest.

I can vnc from the guest 192.168.1.104 to the OpenSolaris host at 192.168.1.133:5900.

I can not vnc from the opensolaris host at 192.168.1.133 to the guest at 192.168.1.104:5903.

Thoughts?

Re: Control guest through VNC

Posted: 2. Apr 2009, 02:41
by TerryE
Have you checked the VNC config on the guest? By default it only allow connections from localhost.

Re: Control guest through VNC

Posted: 2. Apr 2009, 23:00
by jsh123
The guest I am running is Fedora, which worked before I moved it to Virtual Box.

vnc.conf is not needed by fedora according to the article below.

http://www.g-loaded.eu/2005/11/10/confi ... in-fedora/

So I do not know where I would change it for the Fedora guest?

Re: Control guest through VNC

Posted: 3. Apr 2009, 01:12
by TerryE
Sorry, but I don't use Fedora. In Ubuntu, you simply configure VNC through the System -> Preferences -> Remote Desktop Preferences and enable VNC through the General tab. You can select whether to limit access to the localhost or not through the advanced tab. Does Fedora have a similar GUI configuration tool?

My only other suggestion would be to look at another stack as well such as SSH. That way you can work out whether this is a VNC specific issue or a VBox/Guest access one.

Re: Control guest through VNC

Posted: 3. Apr 2009, 13:44
by jsh123
Yes, Fedora has the same GUI. It is under System/Preferences/Internet and Network/Remote Desktop. Currently set for allow users to view and allow users to control on the general tab. Advanced tab setting use port 5900 and no wallpaper.

I can connect to the VB Fedora guest with telnet, ssh, http, https, and ftp. so the network settings appear correct. just wondering how to see if it is OpenSolaris host or Fedora VNC that is messing up on the connection?

Re: Control guest through VNC

Posted: 3. Apr 2009, 17:02
by TerryE
Sorry but I am running out of ideas. Do you have an alternative PC to try connecting from?

Re: Control guest through VNC

Posted: 3. Apr 2009, 18:05
by Perryg
jsh123 wrote:Yes, Fedora has the same GUI. It is under System/Preferences/Internet and Network/Remote Desktop. Currently set for allow users to view and allow users to control on the general tab. Advanced tab setting use port 5900 and no wallpaper.

I can connect to the VB Fedora guest with telnet, ssh, http, https, and ftp. so the network settings appear correct. just wondering how to see if it is OpenSolaris host or Fedora VNC that is messing up on the connection?
You might want to look at the firewall in fedora and make sure that the port is set to allow. By default it is not. (at least on my copy)

Re: Control guest through VNC

Posted: 4. Apr 2009, 15:26
by jsh123
Weird, but that did it. system-config-firewall add ports.

I wonder why it is needed for a guest in virtualbox...

Thanks...

Re: Control guest through VNC

Posted: 4. Apr 2009, 15:39
by Perryg
jsh123 wrote:Weird, but that did it. system-config-firewall add ports.

I wonder why it is needed for a guest in virtualbox...

Thanks...
I am not really sure but when I was struggling with this it was stated that it had something to do with selinux and the way that fedora talked to it. (not sure I really believed it but...) As you said it was strange and I was a non-believer, but it worked. Go figure!

Re: Control guest through VNC

Posted: 15. Jul 2009, 15:15
by viveky
i dont know whether this thread has been closed or not. I have a solution for this. I will explain what i have done

I have navigated to the .vnc folder in the guest os (I am using the fedora core 1) and i have created a file with my vnc user name. There was a file called as localhost.localhost:1.pid which allows localhost to vnc. What I did was I have created a file with my user name called myname.myname:1.pid and changed the content of the file to 5901 for which i have configured the vnc.

Now when i try to connect to vnc using <IP of the guest os>:5901, it works :P

guess it helps