捕获Windows防火墙事件 [英] Catch Windows Firewall Event

查看:136
本文介绍了捕获Windows防火墙事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当防火墙规则中未列出的新应用程序尝试访问Internet时,我们如何捕获Windows防火墙事件?

我们如何使用我的C#应用​​程序访问该信息?

我想要做的是显示一个允许用户在程序尝试连接到Internet时允许/拒绝连接的表格.
我想知道我们是否可以将Windows防火墙用于同一...

How can we capture the event of Windows Firewall that is raised whenever a new application which is not listed in firewall rules tries to access internet ?

How can we access that info using my C# application ?

What i want to do is to show a form allowing user to allow/deny a connection whenever a program tries to connect to the Internet..
I would like to know whether we can use the windows firewall for the same...

推荐答案

对不起,sinoop_joy,我只能在Google 通过COM Interop使用C#控制Windows防火墙 [ ^ ]和使用Windows防火墙API [ ^ ].
Sorry sinoop_joy, I can only find this in the google An Adventure: How to implement a Firewall-Hook Driver?[^], Controlling Windows Firewall using C# via COM Interop[^] and Using Windows Firewall API[^].


一个不错的起点是在msdn博客上发布以下帖子:

http://blogs.msdn.com/b/securitytools/archive/2009/09/14/automating-windows-firewall-settings-with-c-part-2.aspx [
A good starting point for your job could be following post on msdn blog :

http://blogs.msdn.com/b/securitytools/archive/2009/09/14/automating-windows-firewall-settings-with-c-part-2.aspx[^]


这篇关于捕获Windows防火墙事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆