Create firewall "profiles" for Windows 7

9

2

Possible Duplicate:
Limiting network connections to specific sites when travelling / tethered (in windows)

Is there any way to configure a couple of firewall profiles in Windows 7?

As I use mobile broadband on when traveling, I don't want virus scanner/windows updates etc running and chewing up my mobile data allocation. So would love to find a way to block everything except email ports and perhaps http. The kicker though is that when I'm back in the office, I want to just click a button to get my original firewall settings back.

In the office I use WiFi and on the road tether to my android phone, also via WiFi, so can't restrict via network interface.

Any ideas?

Samantha

Posted 2011-02-07T01:38:27.240

Reputation: 91

Question was closed 2013-01-18T23:38:38.150

Answers

7

(You can view this guide with images here)

  1. Before doing anything, back up your current firewall policy. Run Windows Firewall with Advanced Security (type firewall in Run box).

  2. In the right pane, click Export Policy. Save to c:\, as firewallstd.wfw.

  3. Create the policies you wish to implement, and export as c:\firewallstrict.wfw.

  4. Create this batch file, and save as c:\firewallstd.bat:

    netsh advfirewall import c:\firewallstd.wfw
    pause
    
  5. Create this batch file, and save as c:\firewallstrict.bat:

    netsh advfirewall import c:\firewallstrict.wfw
    pause
    
  6. Open Task Scheduler (type task in Run box).

  7. Choose Create a Basic Task.

  8. Name this rule as you see fit.

  9. For task trigger, select When I Log on.

  10. Choose Start a Program.

  11. Choose the .BAT file you created earlier. The finishing dialog will appear. Before clicking Finish, tick "Open the Properties dialog for this task when I click Finish".

  12. In the resulting window, select Run with Highest Privileges.

Once this is complete, log on to the other account and repeat steps 6 through 12, with the policies you desire for that account. You can remove the "pause" from the batch file if you prefer, but it is helpful to confirm that the policy has properly loaded upon logging in.

pramble

Posted 2011-02-07T01:38:27.240

Reputation: 71

1Just linking to your own blog is not an acceptable answer. You may provide a link as a reference, but should include the actual solution in your answer on the site. Please update your answer, or else it will be removed. – nhinkle – 2011-07-07T01:44:29.453