INetFwPolicy2 interface (netfw.h)
The INetFwPolicy2 interface allows an application or service to access the firewall policy.
Inheritance
The INetFwPolicy2 interface inherits from the IDispatch interface. INetFwPolicy2 also has these types of members:
Methods
The INetFwPolicy2 interface has these methods.
INetFwPolicy2::EnableRuleGroup Enables or disables a specified group of firewall rules. |
INetFwPolicy2::get_BlockAllInboundTraffic Indicates whether the firewall should not allow inbound traffic. (Get) |
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. (Get) |
INetFwPolicy2::get_DefaultOutboundAction Specifies the default action for outbound traffic. These settings are Allow by default. (Get) |
INetFwPolicy2::get_ExcludedInterfaces Specifies a list of interfaces on which firewall settings are excluded. (Get) |
INetFwPolicy2::get_FirewallEnabled Indicates whether a firewall is enabled locally (the effective result may differ due to group policy settings). (Get) |
INetFwPolicy2::get_IsRuleGroupCurrentlyEnabled Determines whether a specified group of firewall rules are enabled or disabled. (INetFwPolicy2.get_IsRuleGroupCurrentlyEnabled) |
INetFwPolicy2::get_LocalPolicyModifyState Determines if adding or setting a rule or group of rules will take effect in the current firewall profile. |
INetFwPolicy2::get_NotificationsDisabled Indicates whether interactive firewall notifications are disabled. (INetFwPolicy2.get_NotificationsDisabled) |
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.get_UnicastResponsesToMulticastBroadcastDisabled) |
INetFwPolicy2::IsRuleGroupEnabled Determines whether a specified group of firewall rules are enabled or disabled. (INetFwPolicy2.IsRuleGroupEnabled) |
INetFwPolicy2::put_BlockAllInboundTraffic Indicates whether the firewall should not allow inbound traffic. (Put) |
INetFwPolicy2::put_DefaultInboundAction Specifies the default action for inbound traffic. These settings are Block by default. (Put) |
INetFwPolicy2::put_DefaultOutboundAction Specifies the default action for outbound traffic. These settings are Allow by default. (Put) |
INetFwPolicy2::put_ExcludedInterfaces Specifies a list of interfaces on which firewall settings are excluded. (Put) |
INetFwPolicy2::put_FirewallEnabled Indicates whether a firewall is enabled locally (the effective result may differ due to group policy settings). (Put) |
INetFwPolicy2::put_NotificationsDisabled Indicates whether interactive firewall notifications are disabled. (INetFwPolicy2.put_NotificationsDisabled) |
INetFwPolicy2::put_UnicastResponsesToMulticastBroadcastDisabled Indicates whether the firewall should not allow unicast responses to multicast and broadcast traffic. (INetFwPolicy2.put_UnicastResponsesToMulticastBroadcastDisabled) |
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | netfw.h |