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>”



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish