puppet-windows_firewall icon indicating copy to clipboard operation
puppet-windows_firewall copied to clipboard

Remove curly brackets from interface name (#126)

Open ralfbosz opened this issue 2 years ago • 3 comments

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

ralfbosz avatar Dec 13 '22 12:12 ralfbosz

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?

kenyon avatar Dec 14 '22 07:12 kenyon

Seems new checks are present, which have nothing to do with my PR. I hope my commit message is a bit better now.

ralfbosz avatar Feb 16 '23 10:02 ralfbosz

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', }

ralfbosz avatar Nov 13 '24 10:11 ralfbosz