I have Xuubntu 13.04 guest on a Windows 8 host with nat setup. On the host machine i run a udp server that in listening on port 25000 and after he receives a massage from a client he sends back to it. On the guest there is a client that sends a message to the server and after he receives the response from the server he display it. Now the problem is : the client sends a udp packet to the server containg the message. The server on the host receives that packet correctly and sends back a udp packet to the client containing the same message. But on the client side that packet never arrives and so the client is stuck. I have the same problem even if i swap the role of the guest and host. Can anyone help me to solve this problem ?
ps : Sorry for the english but i'm not so good.
Sending and Receiving udp packets between host and guest
-
PipsTwiddles
- Posts: 3
- Joined: 15. Oct 2013, 15:48
Re: Sending and Receiving udp packets between host and guest
My understanding is that is what the "Host-only Adapter" is for, - sending between a guest and the host.
On guests that only need to talk to the host, I only have a "Host-only Adapter", and on guests that need to access both the Internet as well as the local host computer, I have two network interfaces - one with "NAT" and the other with "Host-only Adapter".
To enable "Host-only Adapter", you first have to create a virtual interface in the VirtualBox global preferences under Network, for example 'vboxnet0', and then have the guest settings use that virtual interface.
Does this help?
On guests that only need to talk to the host, I only have a "Host-only Adapter", and on guests that need to access both the Internet as well as the local host computer, I have two network interfaces - one with "NAT" and the other with "Host-only Adapter".
To enable "Host-only Adapter", you first have to create a virtual interface in the VirtualBox global preferences under Network, for example 'vboxnet0', and then have the guest settings use that virtual interface.
Does this help?
Re: Sending and Receiving udp packets between host and guest
Thanks for the quick reply.
Now i understand why it wasn't working. But what i want to do something else :
First of all my guest need to access to Internet. Second the client contact the server using the public ip of the host. Since i forwarded all the packets arriving on port 25000 to my server, the first packet sent by the client arrives to the server. The server sees that the packets's source ip is host's public ip and so i tries to send back the mesasge using that ip. So what I really want is that the server sends the packet using that ip and the client receiving it . is there a way to do this in virtualbox?
Now i understand why it wasn't working. But what i want to do something else :
First of all my guest need to access to Internet. Second the client contact the server using the public ip of the host. Since i forwarded all the packets arriving on port 25000 to my server, the first packet sent by the client arrives to the server. The server sees that the packets's source ip is host's public ip and so i tries to send back the mesasge using that ip. So what I really want is that the server sends the packet using that ip and the client receiving it . is there a way to do this in virtualbox?
-
noteirak
- Site Moderator
- Posts: 5231
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Sending and Receiving udp packets between host and guest
Few questions before we can give you the optimal solution :
- Is the client located somewhere on Internet?
- Is the host a dedicated server with only one IP available? Can't you assign a dedicated IP to the guest?
- Is the guest your "server"?
- How did you implement the forwarding on port 25000? And from where to where?
- Is the client located somewhere on Internet?
- Is the host a dedicated server with only one IP available? Can't you assign a dedicated IP to the guest?
- Is the guest your "server"?
- How did you implement the forwarding on port 25000? And from where to where?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!