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)
SecureBlock automates a common hardening workflow:
- You select a folder (for example, a game directory or a tools folder).
- SecureBlock recursively scans for
.exefiles. - It shows a dialog listing all discovered executables, including:
- File path
- File size
- Last modified date
- You uncheck anything that should not be touched.
- 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.
-
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.exefiles 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 vianetsh 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.
At a glance:
-
combined.cpp
Main Win32/GDI+ implementation: splash screen, folder chooser,.exediscovery, 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/andmerged-premodern/
Earlier or alternate iterations of the project kept for reference. -
command.txt
Exampleg++command line used to build a static Win32 version on Windows with MinGW. -
LICENSE
Project license (GPL-3.0).
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
git clone https://github.com/ClaireYurev/secureblock.git
cd secureblock/qt-version-modern/SecureBlock
cmake -S . -B build
cmake --build build --config Release