Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove curly brackets from interface name (#126) #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ralfbosz
Copy link

@ralfbosz ralfbosz commented Dec 13, 2022

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

@kenyon
Copy link
Member

kenyon commented Dec 14, 2022

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?

@ralfbosz ralfbosz changed the title This commit deletes curly brackets from output Fix provider windowsfirewall Dec 16, 2022
@ralfbosz
Copy link
Author

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

@ralfbosz ralfbosz changed the title Fix provider windowsfirewall Remove the accolade around interfacename (#126) Nov 13, 2024
The powershell commands places curly brackets
around the name of the interfaces, this causes
an apply on the resource windowsfirewall with
the parameter disabled_interface_aliases every
run. This will fix it.
@ralfbosz ralfbosz changed the title Remove the accolade around interfacename (#126) Remove curly brackets from interface name (#126) Nov 13, 2024
@ralfbosz
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove curly brackets for interface name
2 participants