User Tools

Site Tools


veeam_firewall_configuration_for_hyper-v

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
veeam_firewall_configuration_for_hyper-v [2026/02/18 21:05] – created osoveeam_firewall_configuration_for_hyper-v [2026/03/20 14:47] (current) – [2. PowerShell Script to Open Ports] oso
Line 21: Line 21:
 <code powershell> <code powershell>
 $VeeamPorts = @( $VeeamPorts = @(
-@{Name="Veeam RPC & SMB"; Port="135, 445"; Protocol="TCP"}, +    @{Name="Veeam RPC & SMB"; Port="135,445"; Protocol="TCP"}, 
-@{Name="Veeam NetBIOS"; Port="137-139"; Protocol="Any"}, +    @{Name="Veeam NetBIOS"; Port="137-139"; Protocol="Any"}, 
-@{Name="Veeam Services"; Port="6160, 6162, 6163"; Protocol="TCP"}, +    @{Name="Veeam Services"; Port="6160,6162,6163"; Protocol="TCP"}, 
-@{Name="Veeam Data Transfer"; Port="2500-3300"; Protocol="TCP"}, +    @{Name="Veeam Data Transfer"; Port="2500-3300"; Protocol="TCP"}, 
-@{Name="Veeam Dynamic RPC"; Port="49152-65535"; Protocol="TCP"}+    @{Name="Veeam Dynamic RPC"; Port="49152-65535"; Protocol="TCP"}
 ) )
- 
-# Apply rules 
  
 foreach ($Rule in $VeeamPorts) { foreach ($Rule in $VeeamPorts) {
-New-NetFirewallRule -DisplayName $Rule.Name -Direction Inbound + 
--Action Allow -Protocol $Rule.Protocol +    $params = @{ 
--LocalPort $Rule.Port -Description "Required for Veeam Backup & Replication" +        DisplayName $Rule.Name 
--Group "Veeam Networking"+        Direction   = "Inbound" 
 +        Action      = "Allow
 +        Protocol    $Rule.Protocol 
 +        LocalPort   = $Rule.Port 
 +        Description "Required for Veeam Backup & Replication" 
 +        Group       = "Veeam Networking" 
 +    } 
 + 
 +    New-NetFirewallRule @params
 } }
 </code> </code>
veeam_firewall_configuration_for_hyper-v.1771448717.txt.gz · Last modified: 2026/02/18 21:05 by oso