tags:

views:

60

answers:

2

The program has a black list, it contains a list of sites. When the user opens the site in IE (Firefox, Opera, Chrome) he should get an error. (For example 404). How can I do? It is advisable not writing to the file HOSTS. Language C#. Thanks.

+2  A: 

What you are describing is a Proxy server:

http://www.squid-cache.org/

sum1stolemyname
A: 

The concept behind what you're trying to do is monitoring port 80 outgoing traffic and block any requests addressed to sites/ips contained in the black list.

It's kind of complex posting for you the whole code here.

Regardless, this kind of operation is best suited to a network firewall filter than to a custom C# app that runs on the client.

Matteo Mosca