Solutions Through IT

March 9, 2011

Shell Command Control of Windows Firewall

Filed under: Server 2008 R2, Windows 7 — Tags: , , , — solutionsthroughit @ 14:00

Add Ports to the Exception List:
netsh firewall add portopening TCP 1234 Port/ApplicationLabel
netsh firewall add portopening UDP 5678 Port/ApplicationLabel

Disable the Firewall:
netsh firewall set opmode disable

Enable the Firewall:
netsh firewall set opmode enable

Enable the Firewall and DO NOT Allow Port \ Program Exceptions:
netsh firewall set opmode enable disable

Enable Firewall and Allow Port \ Program Exceptions:
netsh firewall set opmode enable enable

Enable Firewall on Local Area Connection:
netsh firewall set opmode mode=ENABLE interface=”local area connection”

Disable Firewall on Local Area Connection:
netsh firewall set opmode mode=DISABLE interface=”local area connection”

Enable the Firewall on Wireless Network Connection:
netsh firewall set opmode mode=ENABLE interface=”wireless network connection”

Disable Firewall on Wireless Network Connection:
netsh firewall set opmode mode=DISABLE interface=”wireless network connection”

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: