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

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