diff --git a/Guests/RTR-01.ps1 b/Guests/RTR-01.ps1 index b402e99..0706fbd 100644 --- a/Guests/RTR-01.ps1 +++ b/Guests/RTR-01.ps1 @@ -100,19 +100,13 @@ Start-Service RemoteAccess ### Set connection as private ### echo "Set connection as private" -Set-NetConnectionProfile -networkcategory private +Get-NetAdapter | Set-NetConnectionProfile -NetworkCategory Private ### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ### -echo "Allowing ICMPv4 probes" -$Params = @{ - "Name" = 'vm-monitoring-icmpv4' - "Action" = 'Allow' -} +Get-NetFirewallRule -name "*ICMP4-ERQ-In*" | Enable-NetFirewallRule -Set-NetFirewallRule @Params - -# End of scritlet +#END ### Add routes @@ -120,7 +114,7 @@ echo "Adding route" route add -p 192.168.128.8/24 192.168.255.128 route add -p 0.0.0.0/0 192.168.255.254 -# End of scritlet +# End of scriptlet Read-Host "Finished???" diff --git a/Guests/RTR-02.ps1 b/Guests/RTR-02.ps1 index cfe7e5a..9b6c3fd 100644 --- a/Guests/RTR-02.ps1 +++ b/Guests/RTR-02.ps1 @@ -61,20 +61,16 @@ Start-Service RemoteAccess ### Set connection as Private echo "Set connection as private" -Set-NetConnectionProfile -NetworkCategory Private +Get-NetAdapter | Set-NetConnectionProfile -NetworkCategory Private #END -### Activing ICMPv4 probes +### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ### -echo "Activating ICMPv4 probes" -$Params = @{ - "Name" = 'vm-monitoring-icmpv4' - "Action" = 'Allow' -} +Get-NetFirewallRule -name "*ICMP4-ERQ-In*" |Enable-NetFirewallRule -Set-NetFirewallRule @Params #END + ### Activate NAT and DHCP Relay echo "Activate NAT and DHCP Relay" diff --git a/Guests/RTR-03.ps1 b/Guests/RTR-03.ps1 index 15580ac..66871a2 100644 --- a/Guests/RTR-03.ps1 +++ b/Guests/RTR-03.ps1 @@ -57,12 +57,8 @@ Start-Service RemoteAccess ### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ### -echo "Allowing ICMPv4 probes" -$Params = @{ - "Name" = 'vm-monitoring-icmpv4' - "Action" = 'Allow' -} -Set-NetFirewallRule @Params +Get-NetFirewallRule -name "*ICMP4-ERQ-In*" |Enable-NetFirewallRule + #END @@ -80,7 +76,7 @@ Start-Service RemoteAccess ### Set connection as Private echo "Setting connection as private" -Set-NetConnectionProfile -networkcategory private +Get-NetAdapter | Set-NetConnectionProfile -NetworkCategory Private #End # Add routes