473,387 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to block network traffic ?

Hi

In serveral firewall softwares you can block network traffic quickly with
one click, can I do the same in c# ?

Thanks
Nov 17 '05 #1
3 6886
Omega wrote:
Hi

In serveral firewall softwares you can block network traffic quickly with
one click, can I do the same in c# ?

Thanks


If you build a firewall in C#, yes.

Although I think it is possible, building the necessary driver-level
software in C or C++ would probably be a lot easier.

In any case, building a working firewall application is not an easy task
in any language. You need specific knowledge about how to hook into the
network subsystem and how to handle the flow of traffic properly at that
level.

If, on the other hand, you're asking if you can "press that button" in
the firewall software from C#, you might be able to but I doubt it.
Usually the interaction with the firewall software is only possible
through the GUI for the application so that malicious programs can't
interfere with its operation. In any case, that's probably a question
you need to ask the makers of the firewall program you want to control.

--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
Nov 17 '05 #2
"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message
news:On**************@TK2MSFTNGP12.phx.gbl...
If, on the other hand, you're asking if you can "press that button" in
the firewall software from C#, you might be able to but I doubt it.
Usually the interaction with the firewall software is only possible
through the GUI for the application so that malicious programs can't
interfere with its operation.


You'd think that was true. But I'm convinced that my Bit Torrent client (or
is it eMule) can programmtically open a port on the Windows firewall. I
didn't think much to it at the time, I just clicked yes so I could get my
Battlestar Galactica fix. But now you come to mention it....:)

Windows may have prompted me to allow or refuse the change, I can't
remember.

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton
Nov 17 '05 #3

"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message
news:On**************@TK2MSFTNGP12.phx.gbl...
Omega wrote:
Hi

In serveral firewall softwares you can block network traffic quickly with
one click, can I do the same in c# ?

Thanks


If you build a firewall in C#, yes.

Although I think it is possible, building the necessary driver-level
software in C or C++ would probably be a lot easier.

In any case, building a working firewall application is not an easy task
in any language. You need specific knowledge about how to hook into the
network subsystem and how to handle the flow of traffic properly at that
level.

If, on the other hand, you're asking if you can "press that button" in the
firewall software from C#, you might be able to but I doubt it. Usually
the interaction with the firewall software is only possible through the
GUI for the application so that malicious programs can't interfere with
its operation. In any case, that's probably a question you need to ask the
makers of the firewall program you want to control.

--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2


Note that you can't build drivers using C#.

Willy.
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: jayderk | last post by:
Hello all, I am having a problem with one of my desktop applications and was wondering if any of you know of a good tool I can use to monitor traffic in and out of my network card? this is a...
2
by: Ulf | last post by:
Hi, is there any way to programmatically limit the network traffic received on a network adapter in C# ? I need to simulate different speeds over an ADSL connection and run tests covering speed...
1
by: Omega | last post by:
Hi In serveral firewall software you can block all network traffic with one click, can I do the same in c# ? Thanks
10
by: Lespaul36 | last post by:
I need to write a program to block certain URLs when web browsing, but I have not been able to really find anything to help. I was hoping to have a service running in the back that can check...
0
by: news.microsoft.com | last post by:
Any idea how to block traffic on a computer going to specific ip subnets using a vb.net application? Thanks, Shawn
3
by: LucaBrasi | last post by:
I am curious about how Access 2000 handles network requests for data. I have the data on a back-end server, and the front-end is installed on the local machine. Now, lets say I have a select query...
0
by: akhtar | last post by:
How to secure your network Check this article to know how a network analyzer continuously monitors traffic on network and provides detailed information about critical problems, virus attacks and...
7
by: Marc Bartsch | last post by:
Hi, I have a background worker in my C# app that makes a synchronous HttpWebRequest.GetResponse() call. The idea is to POST a file to a server on the internet. When I call HttpWebRequest.Abort()...
1
by: maverickman4 | last post by:
background/setup info: so we have a network set up of about 23 computers including our server which is running windows 2003 standard. we have an incredible amount of traffic going to that server due...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.