FirewallRuleSpecification record

Namespace Runic.Platform.Administration.Windows.Firewall · Runic.Platform.Administration.Windows 0.7.0-preview.5

public sealed record FirewallRuleSpecification : IEquatable<FirewallRuleSpecification>

Inherits or implements IEquatable.

Creates a local firewall rule. Name is the native rule name; Description is explanatory display text.

Remarks

An inbound allow rule must name a program, service, local port or ICMP protocol. Profiles default to Domain and Private; include Public explicitly.

Constructors

FirewallRuleSpecification

public FirewallRuleSpecification(string Name, FirewallDirection Direction, FirewallAction Action)

Creates a local firewall rule. Name is the native rule name; Description is explanatory display text.

Remarks

An inbound allow rule must name a program, service, local port or ICMP protocol. Profiles default to Domain and Private; include Public explicitly.

Properties

Action

public FirewallAction Action { get; init; }

No documentation.

ApplicationPath

public string ApplicationPath { get; init; }

Program path; empty applies to all programs.

Description

public string Description { get; init; }

Description.

Direction

public FirewallDirection Direction { get; init; }

No documentation.

EdgeTraversal

public bool EdgeTraversal { get; init; }

Permit edge traversal.

Enabled

public bool Enabled { get; init; }

Enabled state.

Grouping

public string Grouping { get; init; }

Rule grouping, independently of its name.

IcmpTypesAndCodes

public string IcmpTypesAndCodes { get; init; }

ICMP type/code expression, for protocol 1 or 58.

InterfaceTypes

public string InterfaceTypes { get; init; }

Native interface type expression, such as All, LAN, Wireless or RemoteAccess.

Interfaces

public ImmutableArray<string> Interfaces { get; init; }

Native interface names; empty applies to all interfaces.

LocalAddresses

public string LocalAddresses { get; init; }

Local address expression.

LocalPorts

public string LocalPorts { get; init; }

TCP/UDP local port expression.

Name

public string Name { get; init; }

No documentation.

Profiles

public FirewallProfiles Profiles { get; init; }

Applicable profiles; Public is not included by default.

Protocol

public int Protocol { get; init; }

IP protocol number, or 256 for any.

RemoteAddresses

public string RemoteAddresses { get; init; }

Remote address expression.

RemotePorts

public string RemotePorts { get; init; }

TCP/UDP remote port expression.

ServiceName

public string ServiceName { get; init; }

Service name; empty applies to all services.