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

xFirewall doesn't correctly handle Group property #191

Closed
PshMike opened this issue Mar 1, 2017 · 6 comments · Fixed by #384
Closed

xFirewall doesn't correctly handle Group property #191

PshMike opened this issue Mar 1, 2017 · 6 comments · Fixed by #384
Labels
stale The issue or pull request was marked as stale because there hasn't been activity from the community.

Comments

@PshMike
Copy link

PshMike commented Mar 1, 2017

unable to create / modify a firewall rule and use the group property. Any usage of the this property on Windows Server 2016 node will result in runtime error when applying the configuration.

@tysonjhayes
Copy link
Collaborator

Hello @mjenne - could you please post an example config and the resulting errors that you are seeing? This will help us track this down.

@PlagueHO PlagueHO added help wanted The issue is up for grabs for anyone in the community. waiting for author response The pull request is waiting for the author to respond to comments in the pull request. labels Mar 7, 2017
@PlagueHO
Copy link
Member

PlagueHO commented Mar 7, 2017

Hi @mjenne - is it possible you're seeing something similar to what this issue describes?

@daBONDi
Copy link

daBONDi commented Mar 23, 2017

Got the same Problem here - Windows Server 2016 Standard RTM + CU2
When Rule not Exists it gets created with Group Property, if Rule Exists with Group Property it fails

Don't got a complete Error Message because i'm calling it trough "Ansible" and over WinRM :-)

Passed Back Exception Message in JSON:
Parameter set cannot be resolved using the specified named parameters.

AmbiguousParameterSet,Set-NetFirewallRule

 "Exception": {
        "Data": {},
        "ErrorData": {
            "CimClass": {
                "CimClassMethods": [],
                "CimClassProperties": [
                    {
                        "CimType": 6,
                        "Flags": "None",
                        "Name": "CIMStatusCode",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "CIMStatusCodeDescription",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 4,
                        "Flags": "None",
                        "Name": "error_Category",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 6,
                        "Flags": "None",
                        "Name": "error_Code",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "error_Type",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "error_WindowsErrorMessage",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "ErrorSource",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 4,
                        "Flags": "None",
                        "Name": "ErrorSourceFormat",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 4,
                        "Flags": "None",
                        "Name": "ErrorType",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "Message",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "MessageID",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "OtherErrorSourceFormat",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "OtherErrorType",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "OWningEntity",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    },
                    {
                        "CimType": 4,
                        "Flags": "None",
                        "Name": "PerceivedSeverity",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 4,
                        "Flags": "None",
                        "Name": "ProbableCause",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": 0
                    },
                    {
                        "CimType": 14,
                        "Flags": "None",
                        "Name": "ProbableCauseDescription",
                        "Qualifiers": [],
                        "ReferenceClassName": null,
                        "Value": null
                    }
                ],
                "CimClassQualifiers": [],
                "CimSuperClass": null,
                "CimSuperClassName": null,
                "CimSystemProperties": {
                    "ClassName": "MSFT_WmiError",
                    "Namespace": "root/Microsoft/Windows/DesiredStateConfiguration",
                    "Path": null,
                    "ServerName": "localhost"
                }
            },
            "CimInstanceProperties": [
                {
                    "CimType": 6,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "CIMStatusCode",
                    "Value": 5
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "CIMStatusCodeDescription",
                    "Value": null
                },
                {
                    "CimType": 4,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "error_Category",
                    "Value": 5
                },
                {
                    "CimType": 6,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "error_Code",
                    "Value": 5
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "error_Type",
                    "Value": "MI"
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "error_WindowsErrorMessage",
                    "Value": "The specified Class does not exist."
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "ErrorSource",
                    "Value": ""
                },
                {
                    "CimType": 4,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "ErrorSourceFormat",
                    "Value": null
                },
                {
                    "CimType": 4,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "ErrorType",
                    "Value": null
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "Message",
                    "Value": "Parameter set cannot be resolved using the specified named parameters."
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified",
                    "IsValueModified": false,
                    "Name": "MessageID",
                    "Value": "AmbiguousParameterSet,Set-NetFirewallRule"
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "OtherErrorSourceFormat",
                    "Value": null
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "OtherErrorType",
                    "Value": null
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "OWningEntity",
                    "Value": null
                },
                {
                    "CimType": 4,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "PerceivedSeverity",
                    "Value": null
                },
                {
                    "CimType": 4,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "ProbableCause",
                    "Value": null
                },
                {
                    "CimType": 14,
                    "Flags": "NotModified, NullValue",
                    "IsValueModified": false,
                    "Name": "ProbableCauseDescription",
                    "Value": null
                }
            ],
            "CimSystemProperties": {
                "ClassName": "MSFT_WmiError",
                "Namespace": "root/Microsoft/Windows/DesiredStateConfiguration",
                "Path": null,
                "ServerName": "localhost"
            }
        },

Passing Objects/Properties

"DSCConfigObject": {
        "Name": "xFirewall",
        "Property": {
            "Description": "Allow RDP Sessions to the Host from Management Networks - Manged by Ansible",
            "Direction": "Inbound",
            "EdgeTraversalPolicy": "Block",
            "Enabled": "True",
            "Ensure": "Present",
            "Group": "Ansible Managed",
            "LocalPort": [
                "3389"
            ],
            "Profile": [
                "Domain",
                "Private"
            ],
            "Program": "%SystemRoot%\\system32\\svchost.exe",
            "Protocol": "TCP",
            "RemoteAddress": [
                "172.16.11.0/24",
                "172.16.118.0/24",
                "172.16.119.0/24"
            ],
            "Service": "termservice",
            "name": "Ansible - Allow RDP Sessions from Management Networks"
        }
    },
    "Description": "Allow RDP Sessions to the Host from Management Networks - Manged by Ansible",
    "Direction": "Inbound",
    "EdgeTraversalPolicy": "Block",
    "Enabled": "True",
    "Ensure": "Present",
    "Group": "Ansible Managed",
    "LocalPort": 3389,
    "Profile": "Domain, Private",
    "Program": "%SystemRoot%\\system32\\svchost.exe",
    "Protocol": "TCP",
    "RemoteAddress": "172.16.11.0/24, 172.16.118.0/24,172.16.119.0/24",
    "Service": "termservice",
    "changed": true,
    "failed": true,
    "item_name": "Ansible - Allow RDP Sessions from Management Networks",
    "resource_name": "xFirewall"

@daBONDi
Copy link

daBONDi commented Mar 23, 2017

Looks like same as #130

Until the Bug on Set-NetworkRule with Group Params get fixed, there should be an Ignore If Statement or something.

@stale
Copy link

stale bot commented Jun 16, 2018

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Jun 16, 2018
@stale
Copy link

stale bot commented Jul 26, 2018

This issue has been automatically closed because it is has not had activity from the community in the last 40 days.

@stale stale bot closed this as completed Jul 26, 2018
@johlju johlju removed help wanted The issue is up for grabs for anyone in the community. waiting for author response The pull request is waiting for the author to respond to comments in the pull request. labels Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The issue or pull request was marked as stale because there hasn't been activity from the community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants