salt.modules.win_firewall

Module for configuring Windows Firewall

salt.modules.win_firewall.add_rule(name, localport, protocol='tcp', action='allow', dir='in')

New in version 2015.5.0.

Add a new firewall rule

CLI Example:

salt '*' firewall.add_rule "test" "8080" "tcp"
salt.modules.win_firewall.delete_rule(name, localport, protocol, dir)

Delete an existing firewall rule

CLI Example:

salt '*' firewall.delete_rule "test" "8080" "tcp" "in"
salt.modules.win_firewall.disable(profile='allprofiles')

Disable firewall profile :param profile: (default: allprofiles)

CLI Example:

salt '*' firewall.disable
salt.modules.win_firewall.enable(profile='allprofiles')

Enable firewall profile :param profile: (default: allprofiles)

New in version 2015.5.0.

CLI Example:

salt '*' firewall.enable
salt.modules.win_firewall.get_config()

Get the status of all the firewall profiles

CLI Example:

salt '*' firewall.get_config
salt.modules.win_firewall.get_rule(name='all')

New in version 2015.5.0.

Get firewall rule(s) info

CLI Example:

salt '*' firewall.get_rule "MyAppPort"