How can I configure Windows Firewall without turning the service on?

9,243

Solution 1

Use netsh – all settings are under the firewall context.

  • To quickly open RDP, run netsh fire add port TCP 3389 "Remote Desktop"
  • To manage other settings, run netsh, enter firewall, and use ? to list commands.

You can also edit the settings on Registry directly (regedit), under HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy. (This even works over the network, assuming Remote Registry is running.)

  • For Remote Desktop, under the key StandardProfile\GloballyOpenPorts\List add a string value named 3389:TCP with the data 3389:TCP:*:Enabled:Remote Desktop.

Solution 2

Take a look at the Local Security policy Admin tool. There is a section for Windows firewall.

enter image description here

Share:
9,243
MetaGuru
Author by

MetaGuru

Updated on September 18, 2022

Comments

  • MetaGuru
    MetaGuru over 1 year

    I suddenly could not RDP into my server after rebooting it. Turned out the Firewall was blocking me, I remotely shut off the firewall service (parallels virtuozzo panel) and was able to RDP in. When I went to add my office IP to the firewall to allow me to connect, it won't launch the control panel unless I enable the Windows Firewall. If I do that, it kicks me off of RDP naturally. So how on earth can I configure this thing?

    (cross-posted from Serverfault)

    • Mark Anderson
      Mark Anderson almost 7 years
      I found out that if I recycle firewall RDP will work for a short while
  • user1686
    user1686 over 12 years
    "IP Security Policies" refers to IPsec, not the firewall.
  • MetaGuru
    MetaGuru over 12 years
    Is it that? (see edit to your answer) I don't see it..
  • MetaGuru
    MetaGuru over 12 years
    Ok, the registry edit worked from chosen answer.
  • user1686
    user1686 over 12 years
    "IP Security Policies" refers to IPsec, not the firewall.