Click here to Skip to main content
15,908,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I want to make a firewall and when I looked for some references in "http://msdn.microsoft.com", I understood that I have to use "Microsoft Firewall Service". Please explain that how I can write firewall with it in VC++?
For example in page "http://msdn.microsoft.com/en-us/library/dd436861.aspx" you see this:

Syntax
interface IFWXIpFilter : IUnknown

What does it mean and how should I use it in my C++ code?

Thanks.
Posted
Updated 26-Jul-10 7:34am
v5

1 solution

The IFWXIpFilter is only a part of the filewall interfaces you should use. IFWXIpFilter is for filtering ip adresses.

You should use IFWXNetworkSocket and IFWXSession interface if you want to filter the packetdata and session events. These would be more appropriate because you want to check the sending application and maybe check the data it's sending.

Also you may want to start at the IFWXFirewall Interface because this is where the action begins. This is where you can cal the FilterInit and begin setting up the filter event handlers. I ain't got that much experience with this so that I could send you some example code but this gives you some idea what to look for.

Browse this directory, maybe it can tell you more ;-) Look into socksfilter.h for example...

http://www.dungeon-of-death.net/programs/pc/utilites/network/proxy/MS_ISA_2000_Server_Enterprise_CD/sdk/samples/application_filters/Socks5/[^]

Good luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900