vmware-archive / powernsx

PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions
173 stars 90 forks source link

Unable to dig deep-down into Firewall Rule-Id? #584

Open akaushik-vm opened 5 years ago

akaushik-vm commented 5 years ago

Hello, I want to expand this rule details to find the source address, destination adress, action associated.

PS /Users/akaushik> $AllEdge | where { $_.name -like 'ias-t-e' } | Get-NsxEdgeFirewall | Get-NsxEdgeFirewallRule -RuleId 131073

id : 131073 ruleTag : 131073 name : default rule for ingress traffic ruleType : default_policy enabled : true loggingEnabled : false description : default rule for ingress traffic action : accept edgeId : edge-662

What is the way?

alagoutte commented 5 years ago

Hi,

if there is no source or destination address, i think, it is "any"

akaushik-vm commented 5 years ago

I cannot find a function to get the parameters used in the -ruleid. Yes, I will assume the source and destination addresses are 'any' if there is nothing in the field but how to get that information?

alagoutte commented 5 years ago

Check with GUI ?

akaushik-vm commented 5 years ago

GUI has all the detail, RuleType, SourceAddress(es), DestinationAddress(es) and Action. But I want to automate some part of the network sanity checks and for that, I want to use PowerNsx cmdlets. Would you be able to help me to retrieve the required details, please?

alagoutte commented 5 years ago

Try to look a another rule ? (not the default rules)

Because there is Source Address and DestinationAddress field