State for configuring Windows Firewall
salt.states.win_firewall.
add_rule
(name, localport, protocol='tcp', action='allow', dir='in', remoteip='any')¶Add a new inbound or outbound rule to the firewall policy
Parameters: |
|
---|
Example:
open_smb_port:
win_firewall.add_rule:
- name: SMB (445)
- localport: 445
- protocol: tcp
- action: allow
salt.states.win_firewall.
disabled
(name='allprofiles')¶Disable all the firewall profiles (Windows only)
Parameters: | profile (Optional[str]) -- The name of the profile to disable. Default is
|
---|
Example:
# To disable the domain profile
disable_domain:
win_firewall.disabled:
- name: domainprofile
# To disable all profiles
disable_all:
win_firewall.disabled:
- name: allprofiles
salt.states.win_firewall.
enabled
(name='allprofiles')¶Enable all the firewall profiles (Windows only)
Parameters: | profile (Optional[str]) -- The name of the profile to enable. Default is
|
---|
Example:
# To enable the domain profile
enable_domain:
win_firewall.enabled:
- name: domainprofile
# To enable all profiles
enable_all:
win_firewall.enabled:
- name: allprofiles