I currently have to set up a virtual machine to a public IP. I'm using a second Ethernet adapter for that. That adapter is directly connected to the wall socket with the public IP. Here's the thing:
I only have one public IP (and port forwarding isn't possible with that application), so I'd like to use that adapter exclusively for the VirtualBox virtual machine. How can I do that, without having to give the adapter an IP in the host OS?
I've tried setting the connection to "Network bridge" and to that adapter in Virtual Box and in the host OS I just gave the adapter an IP that doesn't exist in that network (since it's directly connected to the wall socket...), but the VM wasn't ping-able like this...
I've also built a network bridge with that second ethernet adapter and the VirtualBox host-only adapter in Windows (host OS), but the VM wouldn't start like that. As far as I can tell from what I've read afterwards, that doesn't make sense anyway, since the host-only adapter is only used for internal networking.
However, in theory, that actually sounded like what I'm looking for: just "connect" the actual, physical adapter to an adapter that VirtualBox can use, to make the VM use the physical adapter like they're physically connected... Can anyone help?
Cheers, Silas
Bridged networking
is probably what you should use, however, I wonder how your ISP would react when there are two devices/MACs from the same port talking to it (no matter if it's DHCP or static), so I think you need a router (and expose whichever machine needs the public IP through DMZ or so)