Export (0) Print
Expand All

INetFwPolicy2 interface

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

Members

The INetFwPolicy2 interface inherits from the IDispatch interface. INetFwPolicy2 also has these types of members:

Methods

The INetFwPolicy2 interface has these methods.

MethodDescription
get_BlockAllInboundTraffic

Gets 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.

get_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.

get_FirewallEnabled

Gets 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.

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_BlockAllInboundTraffic

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

put_DefaultInboundAction

Sets the value for the default action for inbound 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.

put_ExcludedInterfaces

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

put_FirewallEnabled

Sets the value of the FirewallEnabled property. This property indicates whether the firewall is 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.

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 has these properties.

PropertyDescription

BlockAllInboundTraffic

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

CurrentProfileTypes

Retrieves the bitmask of the currently active profile.

DefaultInboundAction

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

DefaultOutboundAction

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

EnableRuleGroup

Enables or disables a specified group of rules.

ExcludedInterfaces

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

FirewallEnabled

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

NotificationsDisabled

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

RestoreLocalFirewallDefaults

Restores the local firewall configuration to its default state.

Rules

Access to the Rules property for this policy.

ServiceRestriction

Access to the Windows Service Hardening (WSH) store.

UnicastResponsesToMulticastBroadcastDisabled

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 client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Netfw.h

DLL

FirewallAPI.dll

See also

IDispatch
IUnknown

 

 

Build date: 11/16/2013

Community Additions

ADD
Show:
© 2014 Microsoft