fix: network connection profile
This commit is contained in:
parent
197077f147
commit
7ed5d2046e
@ -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???"
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user