Tuesday, August 12, 2014

Hyper-V Server: Enable firewall rule to allow Hyper-V Replica over HTTP or HTTPS

The server is Hyper-V Server 2012 r2 Core and we need to enable the inbound replica traffic on the firewall.  There is no firewall GUI in server core but there is predefined rules for Hyper-V Replica which we need to enable via powershell.  There are several ways for remote access to server core, this way will use RDP because of my wonderful RDP organization with mRemoteNG.  Log on to your Hyper-V Server, move the sconfig window to the side and use the command prompt to open a powershell session.


Powershell can be ran from any directory.  Once in powershell list the default firewall rules by using the Get-NetFirewallRule command-let:

 Get-NetFirewallRule | format-table name, displaygroup, action, direction, enabled -autosize  

The table is pretty long and you may have to widen your console window to show all of the rows, but you will be looking for something like this:


Hyper-V Replica HTTP and Hyper-V Replica HTTPS are the two rules, I went with HTTP in my Hyper-V settings so I will enable that rule by using the Enable-NetFirewallRule command-let:

 Enable-NetFirewallRule -DisplayGroup "Hyper-V Replica HTTP"  

And now we have flowing replica traffic: