26

I'm trying to share my site in the local network. I want to use command line tool to perform this action.

Manually: To enable http access through Windows Firewall on Windows 7. From the start menu begin typing "Allow a program through Windows Firewall". Scroll the bottom of the list and look for World Wide Web Services (HTTP) and enable it on your networks. It works fine.

Command line doesn't work:

>> netsh advfirewall firewall set rule name="World Wide Web Services (HTTP)" new enable=yes

Error: No rules match the specified criteria.

What is wrong in the command line?

NieAR
  • 1,385
  • 6
  • 20
  • 31

5 Answers5

39

For Windows 7: Type firewall.cpl at run (Win + R) and then on the left panel of the opened window go to Advanced settings then in Inbound Rules there will be a list of rules, in these find World Wide Web Services (HTTP Traffic-In) and enable that one if you also interested in HTTPS then also enable World Wide Web Services (HTTPS Traffic-In).

Sohail xIN3N
  • 2,951
  • 2
  • 30
  • 29
10

I had same problem when i used russian version of MS Windows 7 Pro.

This issue was solved when i check "World Wide Web Services (HTTP)" in list of services. For my russian version of Windows it was named "службы Интернета (HTTP)"

So this command line works fine:

>> netsh advfirewall firewall set rule name="службы Интернета  (HTTP)" new enable=yes
Andrey Glazkov
  • 2,398
  • 3
  • 17
  • 19
8

name needs to be rule group as below:

>> netsh advfirewall firewall set rule group="World Wide Web Services (HTTP)" new enable=yes
Josien
  • 13,079
  • 5
  • 36
  • 53
Jamie
  • 81
  • 1
  • 2
  • I received a message saying that 2 settings were changed and that the result was OK. However external access is still denied. (However disabling AVG firewall fixes the problem). Could AVG be interfering? If so is there a workaround? – reubenjohn Jun 19 '14 at 15:19
3

Similar to Sohail xIN3N and contrary to Jamie above but the following is what finally worked for me:

netsh advfirewall firewall set rule name="World Wide Web Services (HTTP Traffic-In)" new enable=yes

System details:

  • Win7 x64
  • Windows Firewall with Advanced Security Version: 6.1.7601.17514
  • IIS 7
Chad Dienhart
  • 5,024
  • 3
  • 23
  • 30
-1

To host your own website on your PC. ensure you have forwarded the traffic on port 80 from your router to your local PC (port forwarding). And ensure the firewall is enabled for the IIS or whichever web server you choose to use.

Frank Liu
  • 1,466
  • 3
  • 23
  • 36