Activate/ Deactivate Firewall

SOTI MobiControl
Windows

Windows Firewall is a security feature that safeguards devices from unauthorized access. It helps protect endpoints and allows you to define network rules to control traffic. This document guides you on configuring firewall settings and rules using scripts in SOTI MobiControl.

Important:
  • It is recommended to test the script on a local/ test machine for its purpose and effects. 
  • SOTI MobiControl will not be responsible for any damage/loss to the data/setup based on the behavior of the script.

Enable net firewall profile

1 Set-NetFirewallProfile -All -Enabled True

Disable net firewall profile

1 Set-NetFirewallProfile -All -Enabled False

Enable chrome internet access

1 New-NetFirewallRule -Name "Chrome Internet Access" -DisplayName "Chrome Internet Access" -Direction Outbound -Program "C:\Program Files\Google\Chrome\Application\chrome.exe" -Enabled True -Profile Any -Action Block

Enable port 80 outbound allow

1 New-NetFirewallRule -Name "Block Port 80" -DisplayName "Block Port 80" -Direction Outbound -Enabled True -Action Allow -Protocol TCP -RemotePort 80

Block port 80 outbound block

1 New-NetFirewallRule -Name "Block Port 80" -DisplayName "Block Port 80" -Direction Outbound -Enabled True -Action Block -Protocol TCP -RemotePort 80

Remove rule by changing "new_rule" attribute

1 Remove-NetFirewallRule -Name "new_rule"

Was this helpful?

Need more help?
Ask Community