Article ID: 947213 - View products that this article applies to.
On a Windows Vista-based computer, the netsh firewall command together with the profile=all parameter does not configure the public profile. For example, the following command opens local port 80 to TCP traffic for the domain profile and for the private profile. But the following command does not open the public profile:
netsh firewall add portopening protocol=TCP port=80 name="Web Port" profile=allThe Windows Firewall Control Panel program only displays settings for the currently active profile. Therefore, if you run this command, and you then open the Windows Firewall Control Panel program when the public profile is active, you receive the following exception: Note This is expected behavior.
If you open the Windows Firewall Control Panel program when the domain profile or the private profile is active, you will receive the following exception:
The netsh firewall command-line tool is used to configure Windows Firewall on a local computer. This command provides the functionality that was supported by Windows Firewall in versions of Windows that are earlier than Windows Vista. The netsh firewall context will continue to function on Windows Vista. However, this command cannot fully configure many new features, such as the public profile.
The new netsh context is the netsh advfirewall command-line tool. This command fully supports the domain profile, the private profile, and the public profile. To work around this issue, use the netsh advfirewall context instead of the netsh firewall context.
Profiles in versions earlier than Windows VistaIn versions of Windows that are earlier than Windows Vista, Windows Firewall supported the following two profiles:
netsh firewall add portopening protocol=TCP port=80 name="Web Port" profile=all
Profiles in Windows VistaIn Windows Vista, profile support has been extended to include the following three profiles:
When you specify the profile=current parameter, the exception for the public profile is created if the current profile is the public profile. This is not the case when you specify the profile=all parameter. This behavior is intended to maintain application compatibility. For example, when the public profile is the active profile at the time that the command is run, the following command opens local port 80 to TCP traffic for the public profile:
netsh firewall add portopening protocol=TCP port=80 name="Web Port" profile=current
Article ID: 947213 - Last Review: February 1, 2008 - Revision: 1.1