Firewall Engine
English · Español
Firewall Engine
CyberWall applies a default-deny architecture using the filtering engine that is already part of Windows. It does not install any driver of its own.
How It Works
Architecture
CyberWall operates at two levels:
| Layer | Technology | Description |
|---|---|---|
| Kernel | WFP (Windows Filtering Platform) | Reports the connections the Windows Firewall blocks |
| User | Windows Firewall COM API | Applies the persistent per-application rules |
No custom WFP filter is ever installed: the decisions are applied as rules in the Windows Advanced Firewall, with netsh and PowerShell as fallbacks.
Detection Methods
| Method | Description |
|---|---|
| Event ID 5157 | Real-time WFP drop detection via Security Audit log |
| TCP Polling | 400ms connection polling for comprehensive coverage |
The audit subcategory that makes the drop events arrive is enabled only while the protection is on, and it is restored when CyberWall stops, so the Security log does not keep growing afterwards.
Default-Deny Philosophy
Unknown connections are blocked by default:
- App attempts network connection
- The Windows Firewall blocks the connection
- CyberWall detects the block and checks for existing rules
- If no rule exists → prompt or block
- Allow always and Block save persistent rules; Allow once grants temporary access (about 10 minutes), while dismissing or letting a prompt expire holds unknown traffic blocked under default-deny without saving a persistent rule
Firewall Modes
Ask to Connect (Default)
When an unknown app tries to connect:
- A popup prompt appears
- Choose Block, Allow once, or Allow always
- Allow once is temporary (about 10 minutes); Allow always and Block save a persistent rule; dismissing or letting a prompt expire keeps the app blocked under default-deny, logs a pending decision, and asks again after a 60-second cooldown
- Optional auto-block timeout for unanswered prompts (off by default; configurable in Settings)
Block All
Silently blocks all unknown connections:
- No prompts shown
- Known apps with allow rules still work
Killswitch
Total network lockdown:
- Blocks all network traffic, including allowed apps
- No prompts shown
- Emergency use
Disabled
No filtering:
- All connections allowed
- Monitoring stops while disabled
- Useful for troubleshooting
Mode Switching
Change modes from:
- System tray icon → right-click menu
- Main window toolbar mode selector
The chosen mode is stored by name, so it is still there after a restart even when it was picked while the protection was off.
Firewall Policy and Recovery
The Profile Policy
While the protection is on, the profile policy of every Windows profile is set to block inbound and block outbound, and each program is allowed individually. Turning the protection off restores the original policy, which is always an allowed outbound state, and removes the per-application rules, so a program that was blocked is not left blocked after the master switch is turned off.
The core service rules are the exception: CyberWall-Allow-Core-* keeps DNS (53), DHCP (67 and 68), NTP (123) and loopback (127.0.0.0/8 and ::1) working, and those rules stay when the protection is turned off. Windows needs an explicit allow rule for loopback traffic, so removing them broke applications that talk to 127.0.0.1 while the filtering was being torn down.
Verified Restore Order
The restore is applied in a fixed order and then verified:
| Step | What happens |
|---|---|
| 1 | netsh advfirewall reset runs first, because it is the only step that resets every profile at once |
| 2 | The inbound action captured when the protection was enabled is applied on top of the reset |
| 3 | The effective policy is read back through the firewall API, never by parsing the localized netsh output |
| 4 | If a profile still blocks outbound traffic, the reset and the captured actions are applied once more |
Outbound is always restored to allow. If the restore cannot be confirmed, the application rules are kept so the host does not lose connectivity, and the failure is reported on the next start instead of passing unnoticed.
Watchdog Task
The default-deny policy is a persistent Windows setting, so a crash could leave the host without connectivity. While the protection is on, a scheduled task named CyberWall Recovery checks a heartbeat file every two minutes:
| Situation | Result |
|---|---|
| CyberWall is running | The task does nothing |
| CyberWall stopped unexpectedly | The policy is restored and the leftover rules are removed |
| The policy could not be restored | The task stays armed and tries again, and the user is warned on the next start |
The task is disarmed when CyberWall closes cleanly.
Turning the Protection Off
Use Exit from the tray menu to close CyberWall completely. Closing the window with the X button only minimizes it to the tray, and the filtering keeps running in the background. The tray icon shows the state: a grey shield means the protection is off.
Rules
Rule Types
Each rule combines a verdict with a direction:
| Type | Description |
|---|---|
| Allow | Permit network access for the app |
| Block | Deny network access for the app |
| Inbound / Outbound / Both | Separate verdicts can apply to incoming and outgoing connections |
Creating Rules
Rules are created when:
- You respond to a popup prompt with Allow always or Block
- You edit per-direction verdicts in the Edit rule dialog
Smart Toolchain Rules
CyberWall automatically resolves companion executables:
- Git → Auto-detects git-remote-https, git-remote-http, ssh, etc.
- Edge WebView2 → Maps host processes correctly
Rule Storage
Rules are stored in:
%ProgramData%\CyberWall\rules.json
The file is written atomically, so an interrupted write can never truncate the stored rules.
Rule Names in Windows Firewall
Every rule CyberWall creates carries a stable hash of the executable path, for example CyberWall-Allow-chrome~a1b2c3d4. Without that hash, two programs with the same file name (two browsers, two installers) would replace each other's rule. Rules created by older versions are recognized and cleaned up on the first run.
Rule Properties
Each rule stores:
| Property | Description |
|---|---|
| App path | Full path to executable (matching key) |
| App name | Display name resolved from product info |
| Verdict | Allow or Block |
| Direction | Inbound, Outbound, or Both, with separate per-direction verdicts |
| Package identity | Package family name for Store / packaged apps |
Process Identity
How CyberWall Identifies Apps
Rules match by executable path and Store package identity. The UI also shows descriptive info:
| Method | Description |
|---|---|
| File path | Full executable path (rule matching key) |
| Package identity | UWP/MSIX package resolution |
| Product info | Version, company, product name shown in the UI |
| Digital signature | Signer / publisher info shown in the UI |
WebView2 Host Resolution
Maps Edge WebView2 runtime processes back to their host applications.
Auto-Block Timeout
Configuration
When a prompt is not answered within the prompt timeout (30 seconds to 30 minutes; default: 5 minutes):
- Default behavior (Auto-block off): The prompt closes without saving a rule. The application stays blocked under the default-deny policy (with a temporary hold on the pending connection), appears as Waiting for your decision in the Notification Center, and prompts again after a 60-second cooldown on its next connection attempt.
- Opt-in Auto-Block (Auto-block on in Settings): CyberWall automatically creates a persistent block rule when the timer expires and can show an Auto-Block alert toast.
Use Case
Prevents indefinite popups on screen:
- Keeps unknown background connections blocked while you step away from the computer (with auto-block either off or on)
- Lets you enable persistent automatic blocking in Settings if you want unanswered prompts saved as permanent block rules immediately
Rule Management
Main Window
The main window shows all rules:
- Search and filter
- Edit rule properties
- Delete rules
Context Menu
Right-click a rule for actions:
| Action | Description |
|---|---|
| Edit | Modify rule properties |
| Search online | Look up the process on the web |
| Copy path | Copy the executable path |
| Open folder | Show executable in Explorer |
| Remove | Delete the rule |