Socket connection to Linux guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
cwjrda
Posts: 4
Joined: 7. Nov 2008, 02:54

Socket connection to Linux guest

Post by cwjrda »

I have just installed VBox with Ubuntu inside. I have set up with Host Interface networking. I can ping the guest from the host successfully.

Now I want to run a server in the guest and a client in the host that communicate via socket. The server opens the socket, but the client can't connect to it. How do I setup to connect to the guest on a known port?

The apps are ones I developed in Java and it works fine between two windows computers.

Thanks.

Host: Win XP Pro, SP2
Guest: Ubuntu 8.10
maxjav
Posts: 1
Joined: 7. Nov 2008, 16:42

Post by maxjav »

Hi, did you find a solution for your problem? I'm trying to do something similar (Host WXP SP2 guest RedHat5), and I can't establish a sever/client socket communication.

Actually I can't even ping, how did you configure the system so the guest is pingable from the host?

My host IP is 192.168.136.80 and my guest is 10.0.2.15. I can browse the web from my guest but can't ping 192.168.136.80. I also try to change the host to 10.0.2.16 but still can't ping.

Any ideas?


Thanks!!!
cwjrda
Posts: 4
Joined: 7. Nov 2008, 02:54

Post by cwjrda »

I had a similar IP address as you indicate when I first installed. I think what changed it was when I changed the Network config to "Host Interface" see the Help file (or User Manual) sections 6.5 and 6.6. After doing that it seems my guest is getting a IPA from the network service.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Socket connection to Linux guest

Post by Sasquatch »

cwjrda wrote:I have just installed VBox with Ubuntu inside. I have set up with Host Interface networking. I can ping the guest from the host successfully.

Now I want to run a server in the guest and a client in the host that communicate via socket. The server opens the socket, but the client can't connect to it. How do I setup to connect to the guest on a known port?

The apps are ones I developed in Java and it works fine between two windows computers.

Thanks.

Host: Win XP Pro, SP2
Guest: Ubuntu 8.10
In Linux, you can't open a socket to listen on a port below 1024 as regular user. Use a higher port number.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
cwjrda
Posts: 4
Joined: 7. Nov 2008, 02:54

Re: Socket connection to Linux guest

Post by cwjrda »

Sasquatch wrote: In Linux, you can't open a socket to listen on a port below 1024 as regular user. Use a higher port number.
I am using (er, trying to use) port 30511.

On a related note, I am successful in connecting in the other direction, that is with the server in Windows and the client in VirtualBox/Ubuntu.
Post Reply