Solved

A question for Rllibby, maybe some delphi experts can answer

Posted on 2010-11-12
6
936 Views
Last Modified: 2012-05-10
About your firewall code(S), that blocks ip address, web address

The way I test on windows XP?, it's fine.
I test on Windows 7, it's not good.

q1:
iS there a WAY to use the firewall code in windows 7?

q2:
And 1 thing I've see in the code, after blocking a few ip address or web address?, it can't unblock.  (the firewall code(s) that you have distributed has no unblock procedure, isn't it?)


Thanks
0
Comment
Question by:systan
  • 3
  • 3
6 Comments
 
LVL 26

Expert Comment

by:Russell Libby
ID: 34127890
Sorry, not really sure what code you are referring to. There is no code distribution on my site for anything "firewall" related, though I have posted code here regarding IP usage/blocking. If you are referring to code here on EE, please post a link to it. Also keep in mind that anything I wrote in Delphi was done years ago, and before Win7. If its not working now, then I would suggest adding error checking into the code to determine exactly what API calls are failing.

Russell

 
 
0
 
LVL 14

Author Comment

by:systan
ID: 34128124
hi

Does this code don't do unblock? it only blocks? y/n?
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20829690.html#10343841


And also it can't be used in windows 7?
But is there a possible way to use that code for windows 7?
Would you share some steps if it is possible.


Thanks
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 34128353
1.) The code as written does not handle unblocking. As stated in the original Q, I provided source to add IP filters, but recommended that it be wrapped in a class to allow unblocking, additional functionality, etc. The outbound handle(s) can be obtained in a call to PfAddFiltersToInterface, and then later passed to PfRemoveFilterHandles to remove them.

2.) No, it can't be used in Vista/Win7. This API is deprecated (notice I wrote this 6 1/2 years ago) and is now replaced with the Windows Filtering Platform API:

http://msdn.microsoft.com/en-us/library/Aa364943
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 14

Author Comment

by:systan
ID: 34129499
rllibby?
What are the possible c headers that I WILL convert to Delphi using windows 7 Filtering Platform APi?, just like unit [fltdefs] in windows xp/2003.
0
 
LVL 26

Accepted Solution

by:
Russell Libby earned 125 total points
ID: 34129578

fwpmu.h
fwpmtypes.h


0
 
LVL 14

Author Closing Comment

by:systan
ID: 34130419
Thanks llibby
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now