INetFwPolicy2 interface

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

Methods

The INetFwPolicy2 interface has these methods.

Method Description
INetFwPolicy2::EnableRuleGroup Enables or disables a specified group of firewall rules.
INetFwPolicy2::get_BlockAllInboundTraffic Indicates whether the firewall should not allow inbound traffic.
INetFwPolicy2::get_CurrentProfileTypes Retrieves the currently active firewall profile.
INetFwPolicy2::get_DefaultInboundAction Specifies the default action for inbound traffic. These settings are Block by default.
INetFwPolicy2::get_DefaultOutboundAction Specifies the default action for outbound traffic. These settings are Allow by default.
INetFwPolicy2::get_ExcludedInterfaces Specifies a list of interfaces on which firewall settings are excluded.
INetFwPolicy2::get_FirewallEnabled Indicates whether a firewall is enabled locally (the effective result may differ due to group policy settings).
INetFwPolicy2::get_IsRuleGroupCurrentlyEnabled Determines whether a specified group of firewall rules are enabled or disabled.
INetFwPolicy2::get_NotificationsDisabled Indicates whether interactive firewall notifications are disabled.
INetFwPolicy2::get_Rules Retrieves the collection of firewall rules.
INetFwPolicy2::get_ServiceRestriction Retrieves the interface used to access the Windows Service Hardening store.
INetFwPolicy2::get_UnicastResponsesToMulticastBroadcastDisabled Indicates whether the firewall should not allow unicast responses to multicast and broadcast traffic.
INetFwPolicy2::IsRuleGroupEnabled Determines whether a specified group of firewall rules are enabled or disabled.
INetFwPolicy2::put_BlockAllInboundTraffic Indicates whether the firewall should not allow inbound traffic.
INetFwPolicy2::put_DefaultInboundAction Specifies the default action for inbound traffic. These settings are Block by default.
INetFwPolicy2::put_DefaultOutboundAction Specifies the default action for outbound traffic. These settings are Allow by default.
INetFwPolicy2::put_ExcludedInterfaces Specifies a list of interfaces on which firewall settings are excluded.
INetFwPolicy2::put_FirewallEnabled Indicates whether a firewall is enabled locally (the effective result may differ due to group policy settings).
INetFwPolicy2::put_NotificationsDisabled Indicates whether interactive firewall notifications are disabled.
INetFwPolicy2::put_UnicastResponsesToMulticastBroadcastDisabled Indicates whether the firewall should not allow unicast responses to multicast and broadcast traffic.
INetFwPolicy2::RestoreLocalFirewallDefaults Restores the local firewall configuration to its default state.

Remarks

All configuration changes take effect immediately.

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

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Target Platform Windows
Header netfw.h

See Also

IDispatch

IUnknown