How to limit IP assignments to a guest OS and setup IP security using ACLs on Hyper-V Server

A little something about everything

internet marketing and website development made simple..

How to limit IP assignments to a guest OS and setup IP security using ACLs on Hyper-V Server

Limiting the use of IPs by each Guest OS is an important step in securing your network from accidental or intentional abuse of IP resources. 

You can limit IPs in Hyper-V 2012 using ACL rules much like any router or managed switch would provide via ACLs.

No Gui is currently available to manage ACLs so you will need to open Windows Powershell if you are in GUI mode. Lets assume you have VM named "Poject1" and you would like to limit this client/gues VM so they can only use 10.0.0.75 as an IP address.

 

Here are the commands:

 Add-VMNetworkAdapterAcl -VMName Project1 -LocalIPAddress 10.0.0.75 -Direction Both -Action Allow

 Add-VMNetworkAdapterAcl -VMName Project1 -LocalIPAddress any -Direction Both -Action Deny

That is it, your done.

 

Now you can check the rules with:

 Get-VMNetworkAdapterAcl -VMName Project1

 

or you can remove the rules using:

 Remove-VMNetworkAdapterAcl -VMName Project1 -LocalIPAddress 10.0.0.75 -Direction Both -Action Allow

 Remove-VMNetworkAdapterAcl -VMName Project1 -LocalIPAddress any -Direction Both -Action Deny

Comments are closed