Page 1 of 1
can you give your guest OS the same IP as the host?
Posted: 18. Mar 2022, 01:18
by g2000
I've been using virtualbox for over 10 years now, and more recently my employer decided to beef up network security. Now when I open a VM I get kicked off my employers network and the port gets shutdown. This has become a big issue since I do most of my work on the VM. I am thinking that the network most likely detects an IP that is doesnt recognize and then shuts off its access. Is their a way to set up virtualbox to give the guest OS's the same IP as the host?
Thanks!
Re: can you give your guest OS the same IP as the host?
Posted: 18. Mar 2022, 01:42
by scottgus1
Yes, but not successfully. You can set any static IP address in the guest's OS you want. But you may not get good connections if it is not in the correct range. And if you duplicate another computer's IP address, the network won't know which computer to send the network packets to, just like the mail carrier would be confused by two houses with the same address.
So, no.
It might be the MAC address too, which also cannot be duplicated.
You can try setting the guest to NAT, then it might get network access, at least internet, but not in the office's IP range, and port forwarding will be required to get access to the guest's services from the host. If you don't need internet or office network access in the guest, you can use Host-Only, then the office network won't see the guest, but your host will see the guest completely, no port forwarding required. See
Virtualbox Networks: In Pictures.
If you must have office network access in the office IP range, then you'll have to convince your boss that you need your guest for work and will lose performance without it, then your boss will make the office filters accept your guest.
Re: can you give your guest OS the same IP as the host?
Posted: 18. Mar 2022, 19:40
by g2000
@scottgus1 thanks for your expertise. I was hoping there might be a workaround but it appears not. I guess Ill have to work on my groveling skills to try and get my guest IP whitelisted

! Thanks again!
Re: can you give your guest OS the same IP as the host?
Posted: 19. Mar 2022, 10:51
by mpack
I wish you would be clear about which network mode you were using. E.g. if you were using NAT then the VirtualBox host service was already translating IP addresses, i.e. replacing the VM IP with the host IP on outgoing packets, so the physical network would not have seen guest IP addresses ... until you started meddling with it by setting static IP addresses!
VMs have no problems accessing the Internet using NAT at my workplace - which of course has a secured local network, however I'm not sufficiently expert on network security features to know if that can be expected as the norm.
Re: can you give your guest OS the same IP as the host?
Posted: 29. Mar 2022, 08:59
by BillG
The thing to note about this discussion is that it really has nothing to do with VirtualBox. It is a basic networking issue.
Regardless of what the network device is, MAC addresses and IP addresses should be unique. If the MAC addresses are identical, data sent on the network to that MAC address could end up going to either. A request sent on the network by one device might receive a reply, but the reply might end up going to the other device. They certainly can't communicate with each other.
If the MAC addresses are different but the IP address is the same, communication between devices on the local network is OK, since that uses the MAC, but any traffic being routed outside the local network will again be random because the IP addresses are the same.
The OP's problem may have nothing to do with this at all. The increased security put in place might simply be that the system now enforces one device per port. That would prevent the vm from any access to the network, since it has to share the host's network port. What the MAC address or IP address is is immaterial.