How can I block a program from accessing the Internet?

62

26

I really want to know how can I prevent a program to connect to Internet with Windows 7 firewall?

I have smart security nod32 business edition installed on my computer.
should i do this job with nod or there is a way in Windows Firewall?

SilverLight

Posted 2011-12-01T16:51:29.167

Reputation: 1 159

Question was closed 2013-08-27T11:43:56.023

Answers

90

Basically you do this to prevent a program from connecting to the Internet:

  1. From start menu, search for "Firewall" and select Windows Firewall with Advanced Security

  2. Choose Outbound Rules from the tree at the left.

  3. Choose New Rule... from the menu at the right.

  4. New Outbound Rule Wizard opens. This is really easy now:

    a. Select Program as rule type.

    b. Select the program's EXE file.

    c. Choose Block the connection.

  5. Choose the profile this rule applies to. If in doubt, select all three.

  6. Add the descriptive name (you may want to delete this rule later).

You're done.

haimg

Posted 2011-12-01T16:51:29.167

Reputation: 19 503

Just tried on a setup.exe and still can access the internet. Doesn't seem to work as expected. – Totty.js – 2019-11-28T15:26:14.713

2Windows Firewall is definitely the easiest way to go. – studiohack – 2012-02-05T16:07:23.763

For Windows XP? – rohan-patel – 2013-04-20T13:12:39.280

3For those of you wondering I'd like to note that you don't need to restart the application or anything; The rule takes effect immediately. – MasterMastic – 2013-08-25T05:41:05.410

7

You can prevent the program from accessing the internet through Windows Firewall.

Or if you know the address it tries to connect to simply add a rule in you hosts file and let it connect to your loopback address :-)

 c:\windows\system32\drivers\etc

 127.0.0.1 example.com

PeeHaa

Posted 2011-12-01T16:51:29.167

Reputation: 244

3

If you're using nod32's firewall, you should block it through that, and disable windows firewall. It's usually recommended not to run two firewalls at the same time, as they can conflict. If you still want to block a program with Windows Firewall, here is a good tutorial.

Edit: Just did a bit of reading and apparently NOD32 doesn't have a firewall, so ignore that.

SaintWacko

Posted 2011-12-01T16:51:29.167

Reputation: 1 482

2

If you wish to use a 3rd party outbound firewall, this is a good one, they have a Free and a Paid version, Free one works well.

.

Moab

Posted 2011-12-01T16:51:29.167

Reputation: 54 203