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

downcase domain_excluded_interfaces #126

Open
ralfbosz opened this issue Jan 12, 2022 · 0 comments · May be fixed by #135
Open

downcase domain_excluded_interfaces #126

ralfbosz opened this issue Jan 12, 2022 · 0 comments · May be fixed by #135
Labels
bug Something isn't working

Comments

@ralfbosz
Copy link

ralfbosz commented Jan 12, 2022

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.14
  • Ruby:
  • Distribution: Windows 2016
  • Module version: 4.0.0

How to reproduce (e.g Puppet code you use)

  windowsfirewall { 'public':
    ensure => present,
    allow_local_firewall_rules => true,
    allow_local_ipsec_rules => true,
    allow_unicast_response_to_multicast => true,
    default_inbound_action => 'block',
    default_outbound_action => 'allow',
    disabled_interface_aliases => 'Default Interface',
    log_allowed => false,
    log_blocked => true,
    log_file_name => '%systemroot%\system32\logfiles\firewall\domain-firewall.log',
    log_max_size_kilobytes => 16384,
    notify_on_listen => true,
  }

What are you seeing

Notice: /Stage[main]/Profile_firewall::Windows/Windowsfirewall[domain]/disabled_interface_aliases: disabled_interface_aliases changed '{Default Interface}' to 'default interface'

(every run !)

What behaviour did you expect instead

Notice: Applied catalog in 8.17 seconds

Output log

Debug: Executing: 'C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe Get-NetFirewallProfile -profile "public" | out-string -width 4096'
Debug: Windowsfirewall found this hash of properties on the system: {:ensure=>:present, :default_inbound_action=>"Block", :default_outbound_action=>"Allow", :allow_inbound_rules=>"NotConfigured", :allow_local_firewall_rules=>"True", :allow_local_ipsec_rules=>"True", :allow_user_apps=>"NotConfigured", :allow_user_ports=>"NotConfigured", :allow_unicast_response_to_multicast=>"True", :notify_on_listen=>"True", :enable_stealth_mode_for_ipsec=>"NotConfigured", :log_file_name=>"%systemroot%\\system32\\logfiles\\firewall\\public-firewall.log", :log_max_size_kilobytes=>"16384", :log_allowed=>"False", :log_blocked=>"True", :log_ignored=>"NotConfigured", :disabled_interface_aliases=>"{Default Interface}", :name=>"public", :provider=>:powershell}
Notice: /Stage[main]/Profile_firewall::Windows/Windowsfirewall[domain]/disabled_interface_aliases: disabled_interface_aliases changed '{Default Interface}' to 'default interface'
Debug: Arguments built for windowsfirewall powershell provider returns: ["Set-NetFirewallProfile", "-Profile", "\"domain\"", "-Enabled", "True", "-DisabledInterfaceAliases", "\"default interface\""]
Debug: Executing: 'C:\Windows\system32\WindowsPowershell\v1.0\powershell.exe Set-NetFirewallProfile -Profile "domain" -Enabled True -DisabledInterfaceAliases "default interface"'
Debug: /Stage[main]/Profile_firewall::Windows/Windowsfirewall[domain]: The container Class[Profile_firewall::Windows] will propagate my refresh event

Any additional information you'd like to impart

It seems that the disabled_interface_aliases is downcased and the powershell command is case-sensitive about it. Also the output of Get-NetFirewallProfile is displaying DisabledInterfaceAliases as a hash:

PS C:\> Get-NetFirewallProfile -profile "public"

Name                            : Public
Enabled                         : True
DefaultInboundAction            : Block
DefaultOutboundAction           : Allow
AllowInboundRules               : NotConfigured
AllowLocalFirewallRules         : True
AllowLocalIPsecRules            : True
AllowUserApps                   : NotConfigured
AllowUserPorts                  : NotConfigured
AllowUnicastResponseToMulticast : True
NotifyOnListen                  : True
EnableStealthModeForIPsec       : NotConfigured
LogFileName                     : %systemroot%\system32\logfiles\firewall\public-firewall.log
LogMaxSizeKilobytes             : 16384
LogAllowed                      : False
LogBlocked                      : True
LogIgnored                      : NotConfigured
DisabledInterfaceAliases        : {Default Interface}
@smortex smortex added the bug Something isn't working label Jan 12, 2022
@ralfbosz ralfbosz linked a pull request Dec 13, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants