fix: network connection profile

This commit is contained in:
Alexandre S 2021-05-10 12:31:36 +02:00
parent 5633d3ac69
commit b26d2a4aaf
3 changed files with 11 additions and 25 deletions

View File

@ -100,19 +100,13 @@ Start-Service RemoteAccess
### Set connection as private ### ### Set connection as private ###
echo "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 ### ### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ###
echo "Allowing ICMPv4 probes" Get-NetFirewallRule -name "*ICMP4-ERQ-In*" | Enable-NetFirewallRule
$Params = @{
"Name" = 'vm-monitoring-icmpv4'
"Action" = 'Allow'
}
Set-NetFirewallRule @Params #END
# End of scritlet
### Add routes ### Add routes
@ -120,7 +114,7 @@ echo "Adding route"
route add -p 192.168.128.8/24 192.168.255.128 route add -p 192.168.128.8/24 192.168.255.128
route add -p 0.0.0.0/0 192.168.255.254 route add -p 0.0.0.0/0 192.168.255.254
# End of scritlet # End of scriptlet
Read-Host "Finished???" Read-Host "Finished???"

View File

@ -61,20 +61,16 @@ Start-Service RemoteAccess
### Set connection as Private ### Set connection as Private
echo "Set connection as private" echo "Set connection as private"
Set-NetConnectionProfile -NetworkCategory Private Get-NetAdapter | Set-NetConnectionProfile -NetworkCategory Private
#END #END
### Activing ICMPv4 probes ### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ###
echo "Activating ICMPv4 probes" Get-NetFirewallRule -name "*ICMP4-ERQ-In*" |Enable-NetFirewallRule
$Params = @{
"Name" = 'vm-monitoring-icmpv4'
"Action" = 'Allow'
}
Set-NetFirewallRule @Params
#END #END
### Activate NAT and DHCP Relay ### Activate NAT and DHCP Relay
echo "Activate NAT and DHCP Relay" echo "Activate NAT and DHCP Relay"

View File

@ -57,12 +57,8 @@ Start-Service RemoteAccess
### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ### ### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ###
echo "Allowing ICMPv4 probes" Get-NetFirewallRule -name "*ICMP4-ERQ-In*" |Enable-NetFirewallRule
$Params = @{
"Name" = 'vm-monitoring-icmpv4'
"Action" = 'Allow'
}
Set-NetFirewallRule @Params
#END #END
@ -80,7 +76,7 @@ Start-Service RemoteAccess
### Set connection as Private ### Set connection as Private
echo "Setting connection as private" echo "Setting connection as private"
Set-NetConnectionProfile -networkcategory private Get-NetAdapter | Set-NetConnectionProfile -NetworkCategory Private
#End #End
# Add routes # Add routes