Note: This script is a part of Rigutils toolset. GitHub: ConfigureFirewall.bat

Prerequisites

  1. Complete Disable UAC step

General info

Detailed information on firewall setup as well as GUI oriented tutorial could be found here.


Instruction

STEP 1. Launch command prompt via cmd_rigutils.bat

STEP 2. Run ConfigureFirewall.bat

1. Type ConfigureFirewall.bat (case of letters doesn't matter)

2. Press Enter

You may start typing Conf and then press the Tab key on your keyboard to speedup command entry. cmd.exe will search for commands in current directory starting with Conf and expand it to it's full name automatically.

ConfigureFirewall.bat

attachmentconfig_firewall_bat_00.pdn


3. You don't have to do anything until the script begins to ask you questions (see STEP 3 below). Here is just a step-by-step walkthrough of actions this script performs:

3.1. Saving current state of firewall into a backup file

set "BackupDir=%~dp0firewall.bak"
if not exist "%BackupDir%" (
    echo == Creating backup directory ==
    echo %BackupDir%
    mkdir "%BackupDir%" || goto :exitWithError
)
 
if not exist "%BackupDir%\firewall.wfw" (
    echo == Saving current firewall configuration ==
    echo file: %BackupDir%\firewall.wfw
    netsh advfirewall export "%BackupDir%\firewall.wfw" || goto :exitWithError    
)

Output:

== Creating backup directory ==
C:\bin\rigutils\windows_tuning\firewall.bak
 
== Saving current firewall configuration ==
file: C:\bin\rigutils\windows_tuning\firewall.bak\firewall.wfw
Ok.
 
For restoring of your original firewall configuration use the command:
  netsh advfirewall import C:\bin\rigutils\windows_tuning\firewall.bak\firewall.wfw
or the following command if you want restore default Windows settings:
  netsh advfirewall reset

STEP 3. Allow selected inbound connections

If you got the message Some error occurred! then you have to analyze output of the script and fix the problem by yourself before running the script again.

Shut up Telemetry.bat

attachmentshutuptelemetry_02.pdn


GitHub ShutupTelemetry.bat

This topic does not exist yet

You've followed a link to a topic that doesn't exist yet. If permissions allow, you may create it by clicking on “Create this page”.