JSI Tip 8818. The 'netsh firewall set portopening protocol=[TCP|UDP] port=<Number> name=<New Port Name> interface=”<Interface Name>”' command in Windows XP SP2 does NOT change the port name?

When you use the following command in Windows XP SP2 to change the TCP or UDP port name in an interface, the command returns Ok.:

netsh firewall set portopening protocol = \[TCP|UDP\] port = <Number> name = <New Port Name> interface = ”<Interface Name>”

When you issue netsh firewall show portopening, you are suprised to see that the port name was NOT changed>

NOTE: If you have a single interface, netsh firewall set portopening protocol = \[TCP|UDP\] port = <Number> name = <New Port Name> works.

To workaround this behavior:

1. Delete the port using:

netsh firewall delete portopening protocol = \[TCP|UDP\] port = <Number> interface = ”<Interface Name>”

2. Add the port back, using:

netsh firewall add portopening protocol = \[TCP|UDP\] port = <Number> name = <New Port Name> interface = ”<Interface Name>”



Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.