Link to home
Create AccountLog in
Avatar of systan
systanFlag for Philippines

asked on

A question for Rllibby, maybe some delphi experts can answer

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
Avatar of Russell Libby
Russell Libby
Flag of United States of America image

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

 
 
Avatar of systan

ASKER

hi

Does this code don't do unblock? it only blocks? y/n?
https://www.experts-exchange.com/questions/20829690/packet-filter-API-example-wanted.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
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
Avatar of systan

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Russell Libby
Russell Libby
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of systan

ASKER

Thanks llibby