After the Windows XP SP2 the Windows firewall service is by default the service which runs on the system startup. By using of the “Windows Firewall” in the control panel it is possible to define the list of so called “exceptions”.
This list defines what ports are opened, because all other ports are by default closed. The existing snap-in (double-click on ‘Windows Firewall’) is very easy and intuitive way to control the list of opened ports (“Exceptions”).
However you will probably sometimes need to establish the connection with some service on some port which is denied by the firewall. In such cases it would be useful to open the port programmatically, without of need to require an administrator to do that manually.
Of course in those cases your application has run in the admin security context. If so, you will have to just create a new string-value in the following registry key to open the port:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List
Following values show some self-explanatory examples:
Some test TCP port
12345:TCP:*:Enabled:DAMIRTEST
Active sync
26675:TCP:169.254.2.0/255.255.255.0:Enabled:ActiveSync Service
Damir Dobric
Powered by:
www.daenet.de
www.daenet.ba
Posted
May 31 2006, 11:51 PM
by
Damir Dobric