Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Windows Server Networking

programmatically finding out firewall profile in use

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2006, 04:22 PM
Default programmatically finding out firewall profile in use



Hi,
I need to report on the firewall settings for a machine. I read that
Domain Profile is used when the machine is part of domain and Standard
Profile is used when in a workgroup. However, for W2k3 SP1 DC a Standard
profile is used instead of Domain Profile
(http://support.microsoft.com/kb/555381/en-us).

Is there a way to programmatically find out which profile is being used for
the firewall?

I had tried using the MS logic of 'Network Determination' from
http://www.microsoft.com/technet/com...uy/cg0504.mspx
In this case if I change the value of
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Group
Policy\History\NetworkName
manually still it is not reflected when the firewall UI is launched.

Is there a programmatic way of finding the profile being used?
Or I have to go with the assumption that a DC will always use Standard
Profile?

This is required because based on the profile I will read the registry
entries. (I want to avoid using any firewall APIs for reading the
configuration and read them directly from registry)

Thanks in advance.

Regards,
Ajey



Ajey
Reply With Quote
  #2  
Old 11-16-2006, 04:59 PM
Phillip Windell
Guest
 
Posts: n/a
Default Re: programmatically finding out firewall profile in use

"Ajey" <(E-Mail Removed)> wrote in message
news:860E6D26-FFA5-4286-B10D-(E-Mail Removed)...

> Is there a way to programmatically find out which profile is being used
> for
> the firewall?


The Firewall Setting dialog will show you that. Even if the firewall
settings are greyed out and won't let you change them, it will tell you the
GPO Profile being used. It is down at the bottom of the box.

You may also be interested in the GP Inventory Tool that is downloadable
from MS.

--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com

The views expressed are my own (as annoying as they are), and not those of
my employer or anyone else associated with me.
-----------------------------------------------------


Reply With Quote
  #3  
Old 11-17-2006, 05:20 AM
Ajey
Guest
 
Posts: n/a
Default Re: programmatically finding out firewall profile in use

Thanks Phillip.
But I need to find out the profile being used in my code and not through UI.

"Phillip Windell" wrote:

> "Ajey" <(E-Mail Removed)> wrote in message
> news:860E6D26-FFA5-4286-B10D-(E-Mail Removed)...
>
> > Is there a way to programmatically find out which profile is being used
> > for
> > the firewall?

>
> The Firewall Setting dialog will show you that. Even if the firewall
> settings are greyed out and won't let you change them, it will tell you the
> GPO Profile being used. It is down at the bottom of the box.
>
> You may also be interested in the GP Inventory Tool that is downloadable
> from MS.
>
> --
> Phillip Windell [MCP, MVP, CCNA]
> www.wandtv.com
>
> The views expressed are my own (as annoying as they are), and not those of
> my employer or anyone else associated with me.
> -----------------------------------------------------
>
>
>

Reply With Quote
  #4  
Old 11-17-2006, 07:55 PM
Phillip Windell
Guest
 
Posts: n/a
Default Re: programmatically finding out firewall profile in use

Code?

That is not a question for networking people.
Ask in a Development Group


--
Phillip Windell [MCP, MVP, CCNA]
www.wandtv.com

The views expressed are my own (as annoying as they are), and not those of
my employer or anyone else associated with me.
-----------------------------------------------------




"Ajey" <(E-Mail Removed)> wrote in message
news:860E6D26-FFA5-4286-B10D-(E-Mail Removed)...
> Hi,
> I need to report on the firewall settings for a machine. I read that
> Domain Profile is used when the machine is part of domain and Standard
> Profile is used when in a workgroup. However, for W2k3 SP1 DC a Standard
> profile is used instead of Domain Profile
> (http://support.microsoft.com/kb/555381/en-us).
>
> Is there a way to programmatically find out which profile is being used
> for
> the firewall?
>
> I had tried using the MS logic of 'Network Determination' from
> http://www.microsoft.com/technet/com...uy/cg0504.mspx
> In this case if I change the value of
> HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Group
> Policy\History\NetworkName
> manually still it is not reflected when the firewall UI is launched.
>
> Is there a programmatic way of finding the profile being used?
> Or I have to go with the assumption that a DC will always use Standard
> Profile?
>
> This is required because based on the profile I will read the registry
> entries. (I want to avoid using any firewall APIs for reading the
> configuration and read them directly from registry)
>
> Thanks in advance.
>
> Regards,
> Ajey
>



Reply With Quote
Reply

Tags
finding, firewall, profile, programmatically

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:48 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.