Class WindowsFirewallRule
- Namespace
- CENTREL.XIA.Configuration.Types
- Assembly
- CENTREL.XIA.Configuration.Types.dll
Represents a Windows firewall rule configured on a Windows machine.
public class WindowsFirewallRule : GlobalSerializableClassicBase, IComparable<WindowsFirewallRule>
- Inheritance
-
WindowsFirewallRule
- Implements
Constructors
WindowsFirewallRule()
Initializes a new instance of the CENTREL.XIA.Configuration.Types.WindowsFirewallRule class.
public WindowsFirewallRule()
Properties
Action
Gets or sets the action of the rule.
public WindowsFirewallRuleAction Action { get; set; }
Property Value
ActionString
Gets the action of the rule as a human readable string.
public string ActionString { get; set; }
Property Value
ApplicationName
Gets or sets the application to which this rule applies.
public string ApplicationName { get; set; }
Property Value
ApplicationNameString
Gets the application to which this rule applies.
public string ApplicationNameString { get; set; }
Property Value
CollectionIndex
Gets the index of the item when used by the data comparer. When scanned using PowerShell, the instance identifier of the rule is used, otherwise the identifier is generated.
public string CollectionIndex { get; }
Property Value
Description
Gets or sets the description of the rule - for example "Inbound rule to allow Asynchronous WMI traffic for remote Windows Management Instrumentation".
public string Description { get; set; }
Property Value
Direction
Gets or sets the direction of the rule - Inbound or Outbound.
public WindowsFirewallRuleDirection Direction { get; set; }
Property Value
DirectionString
Gets the direction of the rule as a human readable string - "Unknown," "Inbound" or "Outbound".
public string DirectionString { get; set; }
Property Value
DuplicateNameOffset
Gets or sets the duplicate name offset. Used by the data comparer.
public int DuplicateNameOffset { get; set; }
Property Value
Enabled
Gets or sets whether the rule is enabled.
public BooleanOption Enabled { get; set; }
Property Value
Identifier
Gets or sets a unique identifier for the rule. This is used internally only.
public Guid Identifier { get; set; }
Property Value
InstanceId
Gets or sets the instance identifier of the rule. This is only available when the information was collected using PowerShell remoting.
public string InstanceId { get; set; }
Property Value
LocalAddresses
Gets or sets the local addresses to which this rule applies.
public SerializableStringCollection LocalAddresses { get; set; }
Property Value
- SerializableStringCollection
LocalAddressesString
Gets or sets the local addresses to which this rule applies as a human readable string.
public string LocalAddressesString { get; }
Property Value
LocalPorts
Gets or sets the local ports to which this rule applies.
public SerializableStringCollection LocalPorts { get; set; }
Property Value
- SerializableStringCollection
LocalPortsString
Gets the local ports as a human readable string.
public string LocalPortsString { get; }
Property Value
Name
Gets or sets the rule name.
public string Name { get; set; }
Property Value
OverrideBlockRules
Gets or sets whether to override block rules.
public BooleanOption OverrideBlockRules { get; set; }
Property Value
ProfileNames
Gets or sets the names of the profiles to which this rule applies as a human readable string in CSV format.
public string ProfileNames { get; set; }
Property Value
Profiles
Gets or sets the the profiles to which this rule applies.
public WindowsFirewallRuleProfileTypes Profiles { get; set; }
Property Value
ProtocolString
Gets the name of the protocol specified for this rule.
public string ProtocolString { get; set; }
Property Value
RemoteAddresses
Gets or sets the remote addresses to which this rule applies.
public SerializableStringCollection RemoteAddresses { get; set; }
Property Value
- SerializableStringCollection
RemoteAddressesString
Gets or sets the remote addresses to which this rule applies as a human readable string.
public string RemoteAddressesString { get; }
Property Value
RemotePorts
Gets or sets the remote ports to which this rule applies.
public SerializableStringCollection RemotePorts { get; set; }
Property Value
- SerializableStringCollection
RemotePortsString
Gets the remote ports as a human readable string.
public string RemotePortsString { get; }
Property Value
RuleIndentifier
Gets the identifier for this rule. This may yield duplciates so is combined with the duplicate offset to give a truely unique.
[Browsable(false)]
public string RuleIndentifier { get; }
Property Value
SecurityType
Gets or sets the security type.
public WindowsFirewallRuleSecurityType SecurityType { get; set; }
Property Value
SecurityTypeString
Gets the security type.
public string SecurityTypeString { get; set; }
Property Value
SourceType
Gets or sets the source where the firewall rule is configured.
public WindowsFirewallSettingSourceType SourceType { get; set; }
Property Value
SourceTypeString
Gets the source where the firewall rule is configured as a human readable string.
public string SourceTypeString { get; set; }
Property Value
Methods
CompareTo(WindowsFirewallRule)
Compares two CENTREL.XIA.Configuration.Types.WindowsFirewallRule objects to allow sorting alphabetically by name.
public int CompareTo(WindowsFirewallRule other)
Parameters
other
WindowsFirewallRuleThe CENTREL.XIA.Configuration.Types.WindowsFirewallRule to compare to.
Returns
- int
The sort order of the two items.
ResolveProtocolNumber(int)
Resolves the specified protocol number to the display name.
public static string ResolveProtocolNumber(int protocolNumber)
Parameters
protocolNumber
intThe protocol number to resolve.
Returns
- string
The display name of the protocol with the specified protocol number.