check whether the firewall is working
the item Windows Firewall/Internet Connection Sharing (ICS) is not shown in the list of Control Panel Services;
the item Windows Firewall/Internet Connection Sharing (ICS) is shown in the list of Services, but the service fails to start;
when attempting to access the Windows Firewall settings, the following error message is displayed:
Method 1. Calling the "Setup API InstallHinfSection" function to install Windows Firewall
To install Windows Firewall, follow these steps:
From the Start menu, select Run, type the command cmd and click OK.
Type the following command at the command prompt and press ENTER:
Rundll32 setupapi,InstallHinfSection Ndi-Steelhead 132 %windir%inf
etrass.inf
Restart Windows.
From the Start menu, select Run, type the command cmd and click OK.
At the command prompt, type the following command and press ENTER:
Netsh firewall reset
From the Start menu, select Run, type the command firewall.cpl and press ENTER. In the Windows Firewall dialog box, select the On (recommended) option and click OK.
Method 2. Adding a Windows Firewall entry to the registry
Warning! Incorrectly modifying the registry using the registry editor or another method can cause serious problems. These problems may require reinstalling the operating system. Microsoft does not guarantee that these problems can be resolved. Modifying the registry is done at your own risk.
To add a Windows Firewall entry to the registry, follow these steps:
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccess]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccess]
"DependOnGroup"=hex(7):00,00
"DependOnService"=hex(7):4e,00,65,00,74,00,6d,00,61,00,6e,00,00,00,57,00,69,00,
6e,00,4d,00,67,00,6d,00,74,00,00,00,00,00
"Description"="Provides support for address translation, addressing, and name resolution services, or prevents intrusion by services in a home network or small office network."
"DisplayName"="Windows Firewall/Internet Connection Sharing (ICS)"
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,
00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,
6b,00,20,00,6e,00,65,00,74,00,73,00,76,00,63,00,73,00,00,00
"ObjectName"="LocalSystem"
"Start"=dword:00000000
"Type"=dword:00000001
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessEpoch]
"Epoch"=dword:00002cd0
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParameters]
"ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,
00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,
69,00,70,00,6e,00,61,00,74,00,68,00,6c,00,70,00,2e,00,64,00,6c,00,6c,00,00,
00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicy]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfile]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfileAuthorizedApplications]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyDomainProfileAuthorizedApplicationsList]
"%windir%\system32\sessmgr.exe"="%windir%\system32\sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfile]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplications]
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList]
"%windir%\system32\sessmgr.exe"="%windir%\system32\sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessSetup]
"ServiceUpgrade"=dword:00000001
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessSetupInterfacesUnfirewalledAtUpdate]
"All"=dword:00000001
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSharedAccessEnum]
"0"="Root\LEGACY_SHAREDACCESS\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001
Copy the following text into Notepad and save the file under the name Sharedaccess.reg:
Double-click the Sharedaccess.reg file to enter its contents into the registry and create the Windows Firewall entry.
Restart Windows.
From the Start menu, select Run, type the command cmd and click OK.
At the command prompt, type the following command and press ENTER:
Netsh firewall reset
From the Start menu, select Run, type the command firewall.cpl and click OK.
Configure the necessary Windows Firewall settings.
Comments