How do I add Windows firewall rules from the command line?

8:50 AM

To add firewall rules from the command line, you can perform the following:

Add Firewall Rule from Command Line

  • netsh advfirewall firewall add rule name="RDP Access" dir=in action=allow protocol=TCP localport=3389
    NOTE - Adds RDP access inbound on port 3389/TCP to all firewall profiles

Delete Firewall Rule from Command Line

  • netsh advfirewall firewall delete rule name="RDP Access"
    NOTE - Deletes the aforementioned firewall rule noted above by its "rule name"

Do note this syntax is for Windows 2008 servers only. For more information please refer to the following link below:
http://support.microsoft.com/kb/947709

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results