Editing, Deleting & Adding advfirewall grouped entries


  1. Posts : 1
    Windows Vista
       #1

    Editing, Deleting & Adding advfirewall grouped entries


    I am creating an interface that allows the user to manage (among other things) the Windows Firewall.

    My GUI is written in Java and uses the netsh advfirewall firewall commands to read the current settings and to save changes.

    Some of the items are single records in the firewall. The "Windows Remote Management" item however, is one of the "grouped" items. This is a combination of multiple items. Here is one of those items in the combination.

    Code:
    Rule Name:                            Windows Remote Management - Compatibility
    Mode (HTTP-In)
    ----------------------------------------------------------------------
    Enabled:                              No
    Direction:                            In
    Profiles:                             Private,Public
    Grouping:                             Windows Remote Management
    LocalIP:                              Any
    RemoteIP:                             LocalSubnet
    Protocol:                             TCP
    LocalPort:                            80
    RemotePort:                           Any
    Edge traversal:                       No
    Action:                               Allow
    In this case the whole group is disabled, but it can be enabled for the type public or private or both. (not to mention domain)

    When you enable this group using the Windows GUI, if you only enable one of the types, it has to duplicate all the items in the group. One copy for disabled type, one for the enabled type.

    The problem arises when I try to create the second copy. The netsh advfirewall firewall add rule command does not allow me to set a grouping on new items. So that means I can't create the second copy! Which means, unless the item has already been duplicated by Windows, I can only enable or disable both types together (public and private) which is not what I want.

    How can I create this second copy? Any ideas on how to do it with Java or the command line? I am hoping to avoid writing my own .exe.
      My Computer


  2. Posts : 5,605
    Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
       #2

    Hi Dorthy, welcome to 7F! :)

    I have been researching your dilemma, and so far the closest I have found is:
    File Replication Service start /w ocsetup FRS-Infrastructure
    Here: Admin's Guide to Server Core Commands - The Life of Brian

    There may also be some help here:
    Download Details - Microsoft Download Center - Windows Server 2008 Step-by-Step Guides

    I have also considered a way to get Windows to copy your CMDs, but have not been able to find anything yet.
    Which means, unless the item has already been duplicated by Windows,

      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:43.
Find Us