Adding a firewall rule for inbound RDP connection to windows 7

When you enable RDP for Windows 7 (default is enabled) , you will also need to add a firewall rule to accept RDP connections. By default this is not enabled. You can easily do it via the Windows firewall MMC by running the following command


or Add a rule for the same via the command prompt. Add a rule for accepting incoming RDP connections on TCP 3389.

netsh advfirewall firewall add rule name="RDP Allow TCP" dir=in protocol=tcp localport=3389 action=allow

Network connections view

I am running Windows 7 on my machine. Coming from XP, I was used to seeing and using the “Network Connections” view. The new “Network and Internet” view for configuring network settings is too confusing. I found it difficult to find my way around. To be frank it was irritating to use and I wanted my “Network Connections” view back.

Here’s a quick workaround:

On the command prompt run the command


and voila the friendly “Network Connections” view is back. 🙂

Change firewall settings from command line

I was looking at options for enabling/disabling the Windows default firewall command line. Here’s how you can do it:

On Windows XP:

to disable the firewal

netsh firewall set opmode disable

to enable the firewall

netsh firewall set opmode enable

to allow ICMP ping to the box

netsh firewall set icmpsetting type = 8 mode = enable

to reset the firewall back to default settings:

netsh firewall reset

On Windows 7 ( & Windows 2008) commands have changed. You will need to run following commands as the machine (domain) administrator.

to disable firewall

netsh advfirewall set allprofiles state off

to enable firewall

netsh advfirewall set allprofiles state on

to reset firewall

netsh advfirewall reset

to allow ICMP ping to the box, add a new rule

netsh advfirewall firewall add rule name="ICMPv4 Allow" dir=in protocol="icmpv4:8,any" action=allow

delete the  ICMP ping rule that you just added

netsh advfirewall firewall delete rule name="ICMPv4 Allow"

For details check out the following KB article#947709