puppet-windows_firewall
puppet-windows_firewall copied to clipboard
Remove curly brackets from interface name (#126)
The command Get-NetFirewallProfile shows the variable DisabledInterfaceAliases with curly brackets, causing every run to change this parameter. Delete all curly brackets from value to solve this.
Pull Request (PR) description
The output of DisabledInterfaceAliases gives curly brackets around the interface-name. Added a delete to the provider to delete these.
This Pull Request (PR) fixes the following issues
Fixes #126
Since the title of this pull request would be used in the changelog, could you come up with a better title that says something about the bug that is being fixed?
Seems new checks are present, which have nothing to do with my PR. I hope my commit message is a bit better now.
Changed the commit message and see it is also green now.
Tested this code on a Windows 2019 machine with:
windowsfirewall { 'domain': ensure => 'present', allow_inbound_rules => 'NotConfigured', allow_local_firewall_rules => 'NotConfigured', allow_local_ipsec_rules => 'NotConfigured', allow_unicast_response_to_multicast => 'True', allow_user_apps => 'NotConfigured', allow_user_ports => 'NotConfigured', default_inbound_action => 'Block', default_outbound_action => 'Allow', disabled_interface_aliases => 'Default Interface', enable_stealth_mode_for_ipsec => 'NotConfigured', log_allowed => 'False', log_blocked => 'True', log_file_name => '%systemroot%\system32\logfiles\firewall\domain-firewall.log', log_ignored => 'NotConfigured', log_max_size_kilobytes => '16384', notify_on_listen => 'True', provider => 'powershell', }