Ok sorry, apparently I thought this would work but I was mistaken. I am terribly sorry for the confusion so far, I'll try to redeem myself now
After trying some stuff I think the easiest solution for you would be to just use firewall rules to isolate the VM, other setups have a bit more complexity and might be too complex for your simple use case.
You can accomplish this by
- Creating a new Security Group (Datacenter > Firewall > Security Group)
- Then add the following rules to the Security Group:
Code:
IN ACCEPT -log nolog # allow incoming traffic
OUT ACCEPT -dest 192.168.x.x -log nolog # allows access to your DNS (if it is on LAN)
OUT ACCEPT -dest 192.168.x.x -log nolog # allows access to your gateway
OUT DROP -dest 192.168.0.0/16 -log nolog # denies all access to other members of LAN
- Add the Security Group to the VM (Select your VM > Firewall > "Insert Security Group") - You can add the name of your interface there so it only applies to the respective vNIC
- Enabling the Firewall on a Datacenter level (Datacenter > Firewall > Options > Firewall > "Yes")
- Enabling the Firewall on the VM (Select your VM > Firewall > Options > Firewall > "Yes")
Once again, sry for the confusion I hope this works for you now.