如何检测防火墙是否正在运行C# [英] How to detect if a firewall is running C#

查看:242
本文介绍了如何检测防火墙是否正在运行C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要知道,是否可以通过 C#代码完成这些事情(如果可以的话):

1.检测系统上是否正在运行任何防火墙.
2.检测是否有任何特定的端口(例如9001)被阻止(出站/入站)
如果是的话;如何知道其传出阻止还是传入阻止.
3.检测我的IP地址是否被ISP阻止.


请回信..
迫切.

仅供参考:(我的应用程序在.NET Framework 4.0(VS 2010)上)

在此先感谢..

Hye Everyone,

I need to know, if these things can be done and (if yes) how they can be done through C# code :

1. to detect if any firewall is running on System.
2. to detect if any particular port (let say 9001) is blocked (outbound/inbound)
and if yes; how to know if its outgoing blocked or incoming blocked.
3. to detect if my IP Address is blocked by ISP or not.


Please, do reply..
its urgent.

FYI : (My application is on .NET Framework 4.0 (VS 2010))

thanks in advance..

推荐答案

你好

请看这些:


通过COM Interop使用C#控制Windows防火墙

如何检查是否启用了外部防火墙?

检测Windows防火墙是否阻止了我的程序?

在C#中,如何检查TCP端口有空吗?

如何检测我的IP地址是否被ISP阻止?
奇怪的问题!与您的Internet提供商联系并询问他们是否阻止了您的IP?


更新:
使用C#自动化Windows防火墙设置

如何更改网络设置(IP地址,DNS,WINS,主机名),其中包含C#中的代码
Hello

Look at these please:


Controlling Windows Firewall using C# via COM Interop

How to check if external firewall is enabled?

Detect if windows firewall is blocking my program?

In C#, how to check if a TCP port is available?

How to detect if my IP Address is blocked by ISP or not?
Strange question! Contact to your Internet provider and ask them if your IP is blocked?


Updates:
Automating Windows Firewall Settings with C#

How can you change Network settings (IP Address, DNS, WINS, Host Name) with code in C#


这篇关于如何检测防火墙是否正在运行C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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