Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable "World Wide Services (HTTP)" in the firewall using command line?

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?

like image 334
NieAR Avatar asked Jun 28 '12 05:06

NieAR


2 Answers

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).

like image 104
Sohail xIN3N Avatar answered Sep 19 '22 21:09

Sohail xIN3N


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 
like image 23
Andrey Glazkov Avatar answered Sep 20 '22 21:09

Andrey Glazkov