Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The INetFwPolicy2 interface allows an application or service to access the firewall policy.
The INetFwPolicy2 interface inherits from the IDispatch interface. INetFwPolicy2 also has these types of members:
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. |
All configuration changes take effect immediately.
The Windows Firewall/Internet Connection Sharing service must be running to access this interface.
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 |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today