State for configuring Windows Firewall
salt.states.win_firewall.
__virtual__
()¶Load if the module firewall is loaded
salt.states.win_firewall.
add_rule
(name, localport, protocol=u'tcp', action=u'allow', dir=u'in', remoteip=u'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=u'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=u'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
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2018.3.0