Skip to content

A bulk utility for adding programs to the Windows Firewall.

License

Notifications You must be signed in to change notification settings

ClaireYurev/secureblock

Repository files navigation

SecureBlock

Bulk Windows Firewall configuration utility.

SecureBlock is a small Windows desktop tool that lets you bulk-create firewall rules for many executables at once, instead of clicking through the Windows Defender Firewall UI for every single program.

It is primarily a learning / portfolio project that experiments with:

  • Windows systems programming and the Win32 API
  • Firewall configuration and security-hardening concepts
  • C++ build tooling with CMake and Qt (experimental UI)

What it does

SecureBlock automates a common hardening workflow:

  1. You select a folder (for example, a game directory or a tools folder).
  2. SecureBlock recursively scans for .exe files.
  3. It shows a dialog listing all discovered executables, including:
    • File path
    • File size
    • Last modified date
  4. You uncheck anything that should not be touched.
  5. For each selected executable, SecureBlock creates a pair of Windows Firewall rules via netsh:
  • One inbound rule
  • One outbound rule

By default, these rules are created as blocking rules, effectively cutting off network access for the selected programs unless other rules already allow them.

Note: this repository is not a full firewall manager; it is a focused bulk-rule helper designed to reduce repetitive clicks.


Features

  • Bulk rule creation
    Pick a directory once and generate rules for all contained executables instead of configuring each program manually.

  • Minimal, focused UI
    A compact Win32 / GDI+ list view dialog shows discovered .exe files with sizes and timestamps and lets you quickly confirm which ones to affect.

  • Transparent splash screen
    A small GDI+ splash window is displayed on startup as a UI polish experiment.

  • Firewall configuration logic in C++
    The core logic (folder browsing, file enumeration, and rule creation via netsh advfirewall) is implemented in standard C++17 and Win32 APIs.

  • Experimental Qt 5/6 variant
    A modern Qt Widgets–based version (qt-version-modern/SecureBlock) is included and built with CMake, showcasing a more portable UI approach and CMake-based tooling.


Repository layout

At a glance:

  • combined.cpp
    Main Win32/GDI+ implementation: splash screen, folder chooser, .exe discovery, list dialog, and firewall-rule creation.

  • resource.*
    Resources for the Win32 UI (dialog template, icon, and splash image).

  • SecureBlockPro.exe
    A prebuilt Windows binary checked into the repository (convenience only; you may prefer to rebuild locally).

  • minimal/
    Minimal/prototype code exploring the firewall interaction in a stripped-down form.

  • qt-version-modern/SecureBlock/
    Qt 5/6 CMake project for the experimental Qt UI.

  • qt-version/ and merged-premodern/
    Earlier or alternate iterations of the project kept for reference.

  • command.txt
    Example g++ command line used to build a static Win32 version on Windows with MinGW.

  • LICENSE
    Project license (GPL-3.0).


Building

1. Requirements

For the classic Win32 / GDI+ version:

  • Windows 10 or later (x64 recommended)
  • A C++17-capable compiler (e.g. MinGW-w64 g++ or MSVC)
  • Windows SDK / Win32 headers and libraries
  • Administrator privileges to run the resulting executable (firewall changes require admin)

For the Qt/CMake version:

  • CMake 3.5+
  • Qt 5.15+ or Qt 6 (Widgets + LinguistTools components)
  • A supported C++ compiler on Windows (MSVC or MinGW)
  • Administrator privileges when running the app

2. Building the Qt version (CMake)

git clone https://github.com/ClaireYurev/secureblock.git
cd secureblock/qt-version-modern/SecureBlock

cmake -S . -B build
cmake --build build --config Release

About

A bulk utility for adding programs to the Windows Firewall.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published