Question

  • Creator
    Topic
  • #2141877

    CMD for firewall rules

    by jablcsla ·

    Tags: 

    I would like to use cmd or ps to accomplish the folllowing:
    Go to Computer Configuration > Policies > Windows Settings > Security Settings > Windows Firewall with Advanced Security > Windows Firewall with Advanced Security – LDAP > Inbound Rules.
    Right-click and choose New Rule.
    Choose Custom and click Next.
    Choose All programs and click Next.
    Select TCP as the Protocol type..
    Select RPC Dynamic Ports as the Local Port and click Next.
    Specify the IP address of the scan node on the remote IP addresses list or choose Any IP address and then click Next.
    Select Allow the connection and click Next.
    Select the checkboxes that fulfill the machine connection conditions and click Next.
    Specify Radar RPC Dynamic Ports as the name and click Finish.
    I have tried the following command but it does not tick the box under the “Programs and Services” tab for “All programs that meet the specified conditions” which is what makes it work:
    netsh advfirewall firewall add rule name=RPCTraffic dir=in action=allow protocol=TCP localport=RPC Dynamic Ports enable=yes remoteip=LocalSubnet profile=domain

You are posting a reply to: CMD for firewall rules

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

Share your knowledge