I needed to open two ports on a large number of machines. Using the Windows GUI is just too time consuming. So I found out how to open the ports via command line, and then added those commands into a batch file that opened the ports, appended to the hosts file, and initiated an installer. This saved me a lot of time, and the less I deal with the XP GUI, the better.
netsh firewall add portopening type number name enable subnet
- type – TCP or UDP
- number – port number (e.g. 80)
- name – name to identify this exception in the firewall
For example, to open up port 80 on the subnet, you could run the command:
netsh firewall add portopening TCP 80 HTTP enable subnet
I’m sure this will come in handy again.



