3

#PSTip How to prevent rogue DHCP servers in Hyper-V

Note: This tip requires PowerShell 3.0 or above.

In a DHCP environment, it is possible for a rogue DHCP server to respond to client DHCP requests and provide incorrect address and configuration information. A rogue DHCP server could be used to redirect traffic for malicious purposes.

Hyper-V Virtual Switches in Windows Server 2012 has a new security feature called DHCP Guard. It drops DHCP server messages from unauthorized VMs pretending to be DHCP server. DHCP Guard allows you to specify whether DHCP server messages coming from a VM should be dropped.

The following command prevents a VM from becoming a rogue DHCP server by turning DHCPGuard “On”. To turn it off, set DHCPGuard to “Off”.

Set-VMNetworkAdapter -VMName VM1 -DhcpGuard On
Filed in: Columns, Tips and Tricks Tags: , ,

3 Responses to "#PSTip How to prevent rogue DHCP servers in Hyper-V"

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: