I'm using Virtualbox 4.0.10 on a Debian Squeeze box. I have a Windows 7 VM that I use to host a game server. After setting up NAT and port redirection, clients can connect to the VM, but the game server shows it's getting connections from the NAT gateway IP (10.0.2.2). I need that the game server gets connections from the actual public internet client IP's, so I can set up an IP whitelist in the game server.

This Debian machine is directly connected to the internet. What can I do to make this work? Guess it's not VirtualBox problem and can solve that with a virtual network interface or so, but no idea how to do it. Guess it's not Virtualbox probmem and I can make it work with a bridge interface or so.

When you say that you setup NAT - did you do that on the Debian host or as part of the virtual machine configuration using the VirtualBox commands/GUI? A better diagram or description of your network setup would be very helpful.
–
GoyuixJul 14 '11 at 2:40

Doesn't work. As I said, this machine is directly connected to the internet, and clients connect from it.
–
AlbertJul 13 '11 at 22:32

Is your 'server' really connected directly to the internet or is there a device (modem/router/xyzzy) that does that ? Did you give the W7 machine a public routable IP address ?
–
IainJul 14 '11 at 5:57

Using a different hypervisor wouldn't necessarily matter - the problem is with the choice of network not the choice of virtualization. The real answer is to use bridged mode if possible.
–
GoyuixJul 14 '11 at 2:38

I suspect that he can't use bridged mode on the host because he does not have multiple public IP addresses. But, that's a solvable problem, so I've added it to the list.
–
SkyhawkJul 14 '11 at 15:23