Jay,
 
I have used commands like this in a BAT file:
 
echo -- Opening Port for Remote Control
netsh firewall set portopening protocol = TCP port = 5990 name = HelpDesk mode =
 ENABLE scope = CUSTOM addresses=192.168.0.0/16,172.17.0.0/16
 
Which allows connections to port 5590 from 2 subnets.
 
For VBS examples, take a look at
http://www.activexperts.com/activmonitor/windowsmanagement/scripts/networking/windowsfirewall/
which looks excellent.
 


From: "[email protected]" <[email protected]>
To: [email protected]
Cc: [email protected]
Sent: Tue, March 22, 2011 1:17:35 PM
Subject: Re: [stunnel-users] Windows Firewall has blocked some features of thisprogram

Hi Josealf,

Thank you for your response and for this information. Is there a VB script
or other method I can use for this purpose? I use a signed Java applet to
download, install, and execute stunnel, but can insert a step to run a VB
or other script on the host prior. I suspect the stunnel installer may do
this already, but after looking, did not see anything.

Thank you

> You can add the required firewall exceptions as part of your installation
> tasks. You just need to allow connections to the incoming port(s) your
> stunnel config use.
>