473,386 Members | 1,726 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,386 software developers and data experts.

block certain IP addresses

Hi, is it possible to block all traffic with an IP address using .NET
Framework?
I wont to write a small program, that runs under win2000/XP and blocks all
traffic with the IP addresses that are in the black list. But looks like the
..NET Framework is the wrong place to look for solution, or am I wrong?

tia
Nov 16 '05 #1
2 3840
Hi,

There is nothing in the framework for this, now there may be a couple of
ways of doing it, first stop should be WMI , take a look at it. another way
may be calling the API directly, but I would bet for WMI first.

do a search for WMI and Win32_NetworkAdapter &
Win32_NetworkAdapterConfiguration

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"rosty" <asdf> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi, is it possible to block all traffic with an IP address using .NET
Framework?
I wont to write a small program, that runs under win2000/XP and blocks all
traffic with the IP addresses that are in the black list. But looks like the .NET Framework is the wrong place to look for solution, or am I wrong?

tia

Nov 16 '05 #2

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:#5**************@TK2MSFTNGP11.phx.gbl...
Hi,

There is nothing in the framework for this, now there may be a couple of
ways of doing it, first stop should be WMI , take a look at it. another way may be calling the API directly, but I would bet for WMI first.

do a search for WMI and Win32_NetworkAdapter &
Win32_NetworkAdapterConfiguration

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"rosty" <asdf> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi, is it possible to block all traffic with an IP address using .NET
Framework?
I wont to write a small program, that runs under win2000/XP and blocks all traffic with the IP addresses that are in the black list. But looks like

the
.NET Framework is the wrong place to look for solution, or am I wrong?

tia


Nov 16 '05 #3

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

Similar topics

3
by: Gary | last post by:
I wish to add this to a few sites to make access irksome (rather than impossible of course) for users from certain IP address blocks. There are plenty of ready-made scripts for specific IP...
3
by: Nurchi BECHED | last post by:
Hello, my dearest respected brother, All! Hey, guys, this is Nurchi again. I had a quick question: Can C# (I guess I should say .NET Framework) block internet access. I am sure the answer is...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
165
by: Dieter | last post by:
Hi. In the snippet of code below, I'm trying to understand why when the struct dirent ** namelist is declared with "file" scope, I don't have a problem freeing the allocated memory. But...
2
by: bryant_j_j | last post by:
Hi everyone, Does anybody know how to redirect every visitor to a webpage, except those coming from some specified IP addresses, to a different webpage? Does anybody know of a JavaScript for...
11
by: Smithers | last post by:
Just wondering if the sequence of the case(s) in the switch block might impact performance. Suppose I switch on an int, and I have 4 expected cases. Lets say I expect case 3 to happen 95% of the...
9
by: dbase | last post by:
Hey guys, I'm new here. Sorry if this is not the correct forum for my question. I run a blog that gets a lot of comments from people. But often I have a problem with spammers that post images...
17
yoda
by: yoda | last post by:
I was wondering if anyone knew if you could block ip addresses because at my school people hack beyond belief while i try to do work, and the windows firewall is off by default and we can't change...
12
by: iheartvba | last post by:
Hi, I am trying to run a VBA procedure to send an e-mail every day at 9:00 PM. How would this be achieved. I'm not sure if this would help but the code is as follows Option Compare Database...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.