MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
June
Sun Mon Tue Wed Thu Fri Sat
     
29    
2016
Months
Jun


Wed, Jun 29, 2016 10:18 pm

Modifying an existing Windows Firewall rule

You can determine if the Microsoft Windows Firewall is enabled from a command line interface (CLI) by opening a command prompt window and using the netsh command netsh advfirewall show currentprofile. If it is enabled, you will see the "state" value is set to "ON".

C:\Users\nell>netsh advfirewall show currentprofile

Public Profile Settings:
----------------------------------------------------------------------
State                                 ON
Firewall Policy                       BlockInbound,AllowOutbound
LocalFirewallRules                    N/A (GPO-store only)
LocalConSecRules                      N/A (GPO-store only)
InboundUserNotification               Enable
RemoteManagement                      Disable
UnicastResponseToMulticast            Enable

Logging:
LogAllowedConnections                 Disable
LogDroppedConnections                 Disable
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize                           4096

Ok.


C:\Users\nell>

If you want to check on whether inbound access is permitted through the firewall for a particular port or application, you can search for it with a netsh advfirewall firewall show rule name=all dir=in command. Since there will likely be many lines of output, you can filter the output for a particular port or application name by piping it to the find command. E.g., if I want to check on whether a rule is in place for an SSH server application, I can have find look for "SSH".

C:\Users\nell>netsh advfirewall firewall show rule name=all dir=in | find "SSH"
Rule Name:                            Bitvise SSH Server (TCP/IPv6 22)
Grouping:                             Bitvise SSH Server
Rule Name:                            Bitvise SSH Server (TCP/IPv4 22)
Grouping:                             Bitvise SSH Server

C:\Users\nell>

[ More Info ]

[/os/windows/software/security/firewall] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo