Click here to Skip to main content
Click here to Skip to main content

An Easy Firewall Application

, 9 Oct 2003
Rate this:
Please Sign up or sign in to vote.
Firewall application developed using Packet Filtering API.

Sample Image - firewallpapi.jpg


When I published my articles about firewall development, I received some e-mails about how to develop a complete firewall solution using the methods described. With this tool I want to give these users an easy example of packet filtering utility.

In this solution I have used Packet Filtering API for Microsoft Windows 2000 and above. I have developed a MFC class wrapper for this API. With this class, I make a simple MFC application that allows a user to set filter rules in local interfaces.

If you want to know more about Packet Filtering API, you can read my article Packet Filtering in .NET. Feel free to e-mail me if you want to know more about this application.

Update history

  • October 6, 2003.- Initial release. Version 1.0.
  • October 9, 2003.- Added support for "default action". Version 1.1.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Jesus Oliva
Chief Technology Officer
Spain Spain
To summarize: learn, learn, learn... and then try to remember something I.... I don't Know what i have to remember...

Comments and Discussions

QuestionNot working on win7!!! PinmemberMember 907371830-Jun-12 13:52 
QuestionWindows7 Pinmembercarlito_brigante29-Oct-11 2:18 
GeneralMy vote of 1 PinmvpDave Kreskowiak11-Oct-11 4:35 
QuestionWorks in XP and not Win7 PinmemberMember 776618018-Jun-11 17:32 
GeneralCan't drop the income packet!! Pinmemberpku200929-Dec-08 1:15 
Questionimp plzzzz help me Pinmembervivekpandey264-Dec-08 8:25 
AnswerRe: imp plzzzz help me PinmemberDhaann21-Feb-09 22:37 
GeneralFirewall inoperative in this situation PinmemberAlGeorge29-Feb-08 11:05 
GeneralRe: Firewall inoperative in this situation PinmemberAlGeorge29-Feb-08 11:16 
GeneralSample in VB.Net PinmemberMember 428824426-Feb-08 4:11 
GeneralFltdefs.h and Iphlpapi.h PinmemberMember 14612587-Dec-07 3:09 
GeneralPlease tell me why PinmemberMD842-Jul-07 23:03 
when I use the function
"DWORD result = filterDriver.WriteIo(ADD_FILTER, &pf, sizeof(pf));"
When debug, it show some error:
Error 9 error C2065: 'METHOD_BUFFERED' : undeclared identifier
Error 10 error C2065: 'FILE_WRITE_ACCESS' : undeclared identifier
Error 11 error C3861: 'CTL_CODE': identifier not found
Can you tell me why and the way to solve this problems. Thanks


GeneralRe: Please tell me why PinmemberManuel Soler (ModMa)4-Sep-07 12:21 
QuestionApplication name? PinmemberChemically Yours20-Jun-07 21:06 
Questionmfc application design? Pinmemberarefix8-Feb-07 21:40 
GeneralCan't load DLL in other computer PinmemberiManiac2-Feb-07 1:43 
GeneralWindows 98 PinmemberArkadiusz z Krakowa20-Dec-06 5:49 
Generalport filtering on LAN Pinmembertasleem1438-Aug-06 2:25 
Generalcannt Filter port Pinmembertasleem1438-Aug-06 1:39 
GeneralIf you know... PinmemberRalph Varjabedian29-Mar-06 22:14 
Generalfor linux firewall design Pinmemberabhikamune4-Mar-06 7:14 
GeneralRe: for linux firewall design PinmemberBrad Bruce4-Mar-06 8:20 
GeneralRe: for linux firewall design PinmemberAmit45124-Jul-07 0:51 
GeneralFirewall in vnisual c++ Pinmemberthe_enginer20-Feb-06 4:34 
Questionhow to drop packet Pinmembereltaweel29-Jun-05 2:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.1 | Last Updated 10 Oct 2003
Article Copyright 2003 by Jesus Oliva
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid