You are not logged in.

#1 2009-03-21 23:05:44

fiod
Member
Registered: 2007-04-02
Posts: 205

SOCKETs on VirtualBox?

Hi,

I am afraid that my University requires me to develope my code on Windows,
thus I have to code using Visual C++ (ouch) on a VirtualBoxed WinXP.

Problem is, when trying to build a simple client-server program, where the client
should connect to the server, say on port 12345, the sockets can't connect.

On a native windows on the same computer everything works OK.

Should I open the required ports on Linux?
On VirtualBox?

Thanks
fiod

Offline

#2 2009-03-23 02:20:48

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: SOCKETs on VirtualBox?

Yes to both.

Offline

#3 2009-03-23 05:37:10

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: SOCKETs on VirtualBox?

I can't offer much help here other than this usually depends on how the VirtualBox network interface is configured, depending on how it is configured you may not be able to access ports on it at all, this is also why ping won't work at all in some cases.

Offline

#4 2009-03-23 09:38:29

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: SOCKETs on VirtualBox?

HashBox wrote:

depending on how it is configured you may not be able to access ports on it at all, this is also why ping won't work at all in some cases.

They recently overhauled their networking stuff. I think it was with 2.1, I don't remember all the specifics but the networking stuff should now be more flexible/usable and the ping problem is fixed.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#5 2009-03-23 17:41:54

fiod
Member
Registered: 2007-04-02
Posts: 205

Re: SOCKETs on VirtualBox?

fumbles wrote:

Yes to both.

Thanks to all for the replies.

Can you offer some information as to how?

Offline

#6 2009-03-23 19:26:59

thisperishedmin
Member
Registered: 2008-11-04
Posts: 164

Re: SOCKETs on VirtualBox?

you may want to enable your network adapter as pass through instead of NAT...should clear things up as your VM will be treated as a standalone computer by the outside world...

good luck

Offline

#7 2009-03-24 06:45:38

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: SOCKETs on VirtualBox?

.

Last edited by fumbles (2020-09-26 11:52:08)

Offline

#8 2009-03-25 12:50:41

thisperishedmin
Member
Registered: 2008-11-04
Posts: 164

Re: SOCKETs on VirtualBox?

fumbles wrote:
fiod wrote:
fumbles wrote:

Yes to both.

Thanks to all for the replies.

Can you offer some information as to how?

You shouldn't use NAT. Select host interface.

derp! i said pass through thinking in VM terms....i meant to say set it to "host interface" or whatever the exact title of that option is.  but yeah, get off NAT and you should be a bit better....

Offline

Board footer

Powered by FluxBB