views:

188

answers:

3

Hello,
I am trying to develop one application which can block all urls using win32 api on windows desktop application.
So is there any api or any procedure doing programmatically so that i can block all urls?

A: 

It's impossible to block just URLs. If you want to make sure no one can access the internet the only way to do this would be to unplug the ethernet cable. (Or whatever is giving you connectivity) Here's why:

  1. Blocking all DNS resolution won't stop someone from accessing http://206.132.84.265/
  2. Blocking port 80 and 443 won't stop someone from accessing a web site hosted on a non-standard port.
  3. Denying access to IE and installation of any other software won't stop someone from downloading a browser that doesn't require to be installed (Like a text browser) and putting it on a thumb drive.
  4. Buying an expensive firewall that blocks HTTP traffic won't be able to stop SSL operating on a non-standard port.

Believe me, back in highschool I worked in a warehouse with a scanner gun and figured out how I could check my email with it (with a little help from my computer at home) since an internet gateway was on the same network.

If you want to block people from surfing the web, disconnect the internet.

Spencer Ruport
A: 

Hey u can do this using windows firewall protocol.

just google for windows firewall protocol.

there are api provided by microsoft. for vista its straight forward, but for xp u need to do some work around, as examples are not available for that.

i have already used this. But i am facing other problem with this, i want to block all url but with some exceptions. If u have any idea on this share with me

with regards Vinayaka Karjigi

Vinayaka Karjigi
A: 

I suppose you can do it using the Windows Firewall API

http://msdn.microsoft.com/en-us/library/Aa366453.aspx

David Gelbart