I haven't done anything like this myself but I think you will need a service running in the background that checks the current open TCP connections against your blacklist and shuts them down if they feature on it. Of course TCP connections appear as IP addresses so your blacklist will either need to consist of IP addresses or you will need to match a domain name to an IP.
thanks hericles . i have to come to know that i can just block any website byu just entering its name in C:\windows\system32\drivers\etc\hosts . but prob is that i want to open this file as administrator so that i can make changes init ,is there any way to open any text file with administrator right and show its all data in my textbox. using vb.net or c# ?
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...