Page 1 of 1

Socket connection to Linux guest

Posted: 7. Nov 2008, 03:06
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

Posted: 7. Nov 2008, 17:17
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!!!

Posted: 7. Nov 2008, 20:49
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.

Re: Socket connection to Linux guest

Posted: 8. Nov 2008, 20:05
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.

Re: Socket connection to Linux guest

Posted: 13. Nov 2008, 20:02
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.