INetFwPolicy2 Interface

The INetFwPolicy2 interface allows an application or service to access the firewall policy.

Methods

The INetFwPolicy2 interface inherits the methods of the IDispatch interface.

In addition, INetFwPolicy2 defines the following methods.

MethodDescription

get_BlockAllInboundTraffic

Gets the value of the BlockAllInboundTraffic property. This property indicates whether inbound traffic is blocked for a specified profile.

put_BlockAllInboundTraffic

Sets the value of the BlockALlInboundTraffic property. This property indicates whether inbound traffic is blocked for a specified profile.

get_CurrentProfileTypes

Retrieves the bitmask of the currently active profile.

get_DefaultInboundAction

Gets the value for the default action for inbound traffic. It can be either allowed or blocked.

put_DefaultInboundAction

Sets the value for the default action for inbound traffic. It can be either allowed or blocked.

get_DefaultOutboundAction

Gets the value for the default action for outbound traffic. It can be either allowed or blocked.

put_DefaultOutboundAction

Gets the value for the default action for outbound traffic. It can be either allowed or blocked.

get_ExcludedInterfaces

Gets the value of the ExcludedInterfaces property. This property contains the list of interfaces excluded from a specified profile's firewall rules.

put_ExcludedInterfaces

Sets the value of the ExcludedInterfaces property. This property contains the list of interfaces excluded from a specified profile's firewall rules.

get_FirewallEnabled

Gets the value of the FirewallEnabled property. This property indicates whether the firewall is enabled or disabled for a specified profile.

put_FirewallEnabled

Sets the value of the FirewallEnabled property. This property indicates whether the firewall is enabled or disabled for a specified profile.

get_IsRuleGroupCurrentlyEnabled

Determines whether a specified group of firewall rules is enabled or disabled for the current profile, considering the firewall's state, BlockAllInboundTraffic state and group policy overrides state.

get_IsRuleGroupEnabled

Determines whether a specified group of firewall rules is enabled or disabled.

get_LocalPolicyModifyState

Determines if adding or setting a rule or group of rules will take effect in the current firewall profile.

get_NotificationsDisabled

Gets the value of the NotificationsDisabled property. This property indicates whether notifications are enabled or disabled for a specified profile.

put_NotificationsDisabled

Sets the value of the NotificationsDisabled property. This property indicates whether notifications are enabled or disabled for a specified profile.

get_Rules

Gets the value of the Rules property.

get_ServiceRestriction

Retrieves the interface to manipulate the Windows Source Hardening (WSH) store.

get_UnicastResponsesToMulticastBroadcastDisabled

Gets the value of the UnicastResponseToMulticastBroadcastDisabled property. This property indicates whether the firewall should allow unicast incoming responses to outgoing multicast and broadcast traffic.

put_UnicastResponsesToMulticastBroadcastDisabled

Sets the value of the UnicastResponseToMulticastBroadcastDisabled setting. This property indicates whether the firewall should allow unicast incoming responses to outgoing multicast and broadcast traffic.

 

Properties

The INetFwPolicy2 interface defines the following properties.

PropertyAccess typeDescription

BlockAllInboundTraffic

Read-only

Access to the property that indicates that inbound traffic should be blocked by the firewall.

CurrentProfileTypes

Read-only

Retrieves the bitmask of the currently active profile.

DefaultInboundAction

Read-only

Access to the property that specifies the default action for inbound traffic.

DefaultOutboundAction

Read-only

Access to the property that specifies the default action for outbound.

EnableRuleGroup

Read-only

Enables or disables a specified group of rules.

ExcludedInterfaces

Read-only

Access to a list of interfaces on which firewall settings are excluded.

FirewallEnabled

Read-only

Access to the property that indicates whether the firewall is enabled.

NotificationsDisabled

Read-only

Access to the property that indicates whether interactive firewall notifications are disabled.

RestoreLocalFirewallDefaults

Read-only

Restores the local firewall configuration to its default state.

Rules

Read-only

Access to the Rules property for this policy.

ServiceRestriction

Read-only

Access to the Windows Service Hardening (WSH) store.

UnicastResponsesToMulticastBroadcastDisabled

Read-only

Access to the property that indicates whether unicast incoming responses to outgoing multicast and broadcast traffic are disabled.

 

Remarks

All configuration changes take effect immediately.

The Windows Firewall/Internet Connection Sharing service must be running to access this interface.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderNetfw.h
DLLFirewallAPI.dll

See Also

IDispatch
IUnknown

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags :


Page view tracker