-
Notifications
You must be signed in to change notification settings - Fork 89
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
xFirewall: DisplayName not set correctly if not in desired state #234
Comments
Hi @freni59, Thanks for raising this and all the info. Are you able to apply your config above with the -Verbose keyword specified and then dump the log here? xFirewall has lots of Verbose logging entries that may tell us what is going on here. There are a few little "gotchas" with the way the *-NetFirewallRule cmdlets work with "Built-in" rules that may be involved here. But I'll know more with the Verbose logs hopefully. Thanks again! |
Hi @PlagueHO, Lets see I ran an apply with verbose and this is what I got as an output:
I did a fork and found part of a solution, a "Name" that should be a "DisplayName", can put up a pull request for that one, but I am a little bit too rookie to find out how to correct the verbose output because it still says it is changing the DisplayName to Name.... |
There is something funky with that line in the verbose output. this is the output from a config run when the remoteaddresses are wrongly set to Any, the DisplayName is not change but it still gives that output line stating Set-NetFirewallRule.... That output might be a totally different issue?
|
Ok, this is an odd one, found it by chance. So short background, I usually use DSC through Puppet, but no worries I have reproduced this strangeness in "native" DSC code as well. I had a few rules (one bultin for SNMP and the other one created by the installation of NSClient++) that have been set to remote address 'Any' by default. Looking into that, wanting to restrict the allowed addresses, I created a suitable config with xFirewall and in a big environment its rather nice to in an easy way see "what" actually set something to "something" so I thought of incorporating the puppet modules name in the DisplayName of the rule. That is when I stumbled on this one: If the DisplayName is not already in the desired state it will be set to Name for some unknown reason.
So this is what I got:
What I expect to see is:
displayname = 'NSClient++ Monitoring Agent'
What I get, if not in desired state (say the rule was manually renamed to 'This is a faulty displayname'):
displayname = '{9142D173-5ACD-4AA5-BA0E-4FE2FB4CEB36}'
While if the name is already 'NSClient++ Monitoring Agent' I get:
displayname = 'NSClient++ Monitoring Agent'
I've tried different versions of the module as 3.2.0.0 is the one included with puppetlabs-dsc, but natively 3.2.0.0 and 5.0.0.0 gives me the same results. To get the correct name set again you have to either:
Set-NetFirewallRule -name '{9142D173-5ACD-4AA5-BA0E-4FE2FB4CEB36}' -NewDisplayName 'NSClient++ Monitoring Agent'
or cut'n paste in the Firewall GUI....The text was updated successfully, but these errors were encountered: