2026-11-21 13:12:38 +01:00

rwfc – Rust Windows Firewall Control

rwfc manages Windows Defender Firewall rules. It aims to replace binisoft Windows Firewall Control (WFC), with a focus on automation:

  • Wildcard program rules such as C:\Users\Jean\code\**\target\*\*.exe. rwfc creates one firewall rule per matching program, including programs that appear later (file watcher, with blocked connections as a fallback).
  • Filter profiles High, Medium, Low and Off like WFC, opt-in and fully reversible, and notifications for blocked programs (Allow/Block, permanently or for a while) with a tray icon, and a learning mode that allows signed programs without asking.
  • Rule guard (opt-in): new or changed firewall rules of other programs are reported; you accept them or disable them (reversible). Like WFC's "Secure Rules", but nothing is removed behind your back.
  • CLI rwfc and MCP server rwfc-mcp for scripts and AI agents. MCP is read-only until a human allows writing (or turns MCP off) in the window or an elevated shell.
  • Installer and releases built in Gitea; the window starts, stops and configures the service and the MCP access after a UAC prompt.
  • Filter lists: Spamhaus DROP, FireHOL Level 1 and abuse.ch Feodo block known malicious addresses for every program; MalwareBazaar blocks programs whose SHA-256 is listed. Opt-in, cached for offline restarts, private ranges and your exceptions are never blocked.
  • Program insights: what a blocked program says about itself (description, company, version, signature, architecture, build time, SHA-256), its icon, "Show in Explorer", and an overview with charts of what was blocked.
  • Change log: every change is recorded with the client and the reason.
  • Complete reset: removes all rwfc rules. Rules of other programs stay untouched.

rwfc-ui, Overview page

More pages under Screenshots.

The specification, plan and tasks live in specs/001-firewall-control, specs/002-desktop-ui, specs/003-profiles-notifications, specs/004-program-insights, specs/005-filter-lists, specs/006-ui-polish, specs/007-learning-mode, specs/008-ui-navigation-context-menus, specs/009-rule-guard, specs/010-timed-profiles-exceptions, specs/011-network-monitor and specs/012-modal-editors (Spec Kit), the principles in .specify/memory/constitution.md.

Status (MVP)

Done: wildcard rules, manual rules, drift reconciliation, change log, alerts (Application log), CLI, MCP server (42 tools), Windows service, emergency reset, the desktop interface rwfc-ui (spec 002), filter profiles, notifications, temporary rules, a 7-day history of blocked connections and the tray icon (spec 003), program details, icons and the overview page (spec 004), IP and hash filter lists (spec 005), the learning mode (spec 007), the rule guard (spec 009), timed profile switches and notification exceptions (spec 010), the network monitor with traffic per program and a connection log (spec 011) and the rule and wildcard forms as dialogs (spec 012).

Components

Program Role
rwfc-service.exe Windows service (LocalSystem). Contains the engine, the file watcher, the event 5157 subscription and the IPC server on \\.\pipe\rwfc.
rwfc.exe CLI, runs without administrator rights. Admin commands: reset, enable, mcp access, mcp write, service (except service status).
rwfc-mcp.exe MCP server (stdio) for AI agents. Runs without administrator rights.
rwfc-ui.exe Desktop interface (GPUI) with tray icon and notification window. Runs without administrator rights, one instance per user.

All rwfc rules live in the firewall group rwfc; their names start with rwfc:. Data is stored in %ProgramData%\rwfc: state.json, alerts.json, audit\*.jsonl (kept 90 days), blocked\*.jsonl (blocked connections, kept 7 days) and logs\.

Building

cargo build --release --workspace

If crates.io is unreachable: run cargo fetch first, then build with CARGO_NET_OFFLINE=true. powershell -File scripts/check.ps1 runs the quality gates (fmt, clippy -D warnings, tests, the shader hash of vendor/gpui-pre-windows). Releases come from Gitea (next sections).

Trying it without touching the system

The service runs in console mode with an in-memory firewall backend:

target/release/rwfc-service run --console --backend memory --pipe rwfc-dev --dev-trust-admin

In a second shell:

target/release/rwfc --pipe rwfc-dev wildcards preview "C:\Users\Jean\code\**\target\*\*.exe"
target/release/rwfc --pipe rwfc-dev wildcards add --name dev-builds "C:\Users\Jean\code\**\target\*\*.exe"
target/release/rwfc --pipe rwfc-dev rules list --owner rwfc
target/release/rwfc --pipe rwfc-dev audit

--dev-trust-admin treats every client as administrator. It is only allowed with the memory backend.

Installer and releases

Releases are built in Gitea from a tag v<version> and published at https://code.jeanavril.com/jean/rwfc/releases: rwfc-setup-<version>.exe (installer), rwfc-<version>-x64.zip (the four programs) and SHA256SUMS. Check a download with Get-FileHash rwfc-setup-0.2.0.exe against SHA256SUMS. The programs are not code-signed, so SmartScreen may warn on the first start ("More info" → "Run anyway").

The installer (per machine, needs administrator rights):

  • installs the four programs to C:\Program Files\rwfc\ and an uninstall entry ("Apps"),
  • installs the service (or points an existing one at the new folder) and starts it,
  • options: Start menu entry rwfc (on), tray icon at logon (on), add the folder to the system PATH (off); the choices are remembered for the next upgrade,
  • ends with "Start rwfc" (opens the window).

Running it again upgrades in place: it stops the service, closes rwfc-ui instances started from the install folder, replaces the files (retrying while one is locked) and keeps data, rules and the service. rwfc-setup-<version>.exe /S installs silently (/D=<folder> as the last argument picks the folder). Uninstalling (Apps, or uninstall.exe, silent with /S) runs rwfc service uninstall --yes, which removes every rwfc rule and restores the firewall settings, then the service, the files, shortcuts, the uninstall entry and the PATH entry. It asks whether to delete %ProgramData%\rwfc (default no; silent uninstalling keeps it). Both log to %ProgramData%\rwfc\logs\setup.log. Registrations of rwfc-mcp in AI clients (see MCP) stay; remove them on the System page first.

How the release is built: .gitea/workflows/release.yml cross-compiles the workspace on the Linux runner for x86_64-pc-windows-msvc with cargo-xwin (pinned version and checksum; it downloads the MSVC CRT and Windows SDK through xwin, which means accepting Microsoft's license for them), LLVM and NSIS from Debian. The C runtime is linked statically (no VCRUNTIME140.dll), the job checks that and the embedded icon. GPUI compiles its shaders with fxc.exe on Windows; the cross-build uses the copy in vendor/gpui-pre-windows with the compiled shaders checked in (see vendor/README.md, scripts/check.ps1 checks the shader hash). A push to a ci-* branch or a manual run keeps the installer as a run artifact; a tag whose version differs from Cargo.toml fails before building.

Installation from source (changes the system)

Without the installer: double-click scripts\install.cmd. It builds the release as the normal user, then asks for administrator rights (UAC) and:

  • copies the three programs to C:\Program Files\rwfc\ (stops a running rwfc service first, so it also works for upgrades),
  • installs and starts the service and shows rwfc status,
  • asks whether to add the wildcard dev-builds for %USERPROFILE%\code\**\target\*\*.exe and whether to add the folder to your user PATH (both default to no).

powershell -ExecutionPolicy Bypass -File scripts\install.ps1 -DryRun shows the current state without changing anything. The log goes to target\install\.

Manual installation in an elevated shell:

  1. Copy rwfc.exe, rwfc-service.exe and rwfc-mcp.exe to a fixed folder, e.g. C:\Program Files\rwfc\. Do not run the service from target\, a rebuild would then fail on the locked files.

  2. Install and start the service:

    rwfc service install
    rwfc service start
    rwfc status
    

    install creates the service with automatic start, registers the event source rwfc in the Application log and protects %ProgramData%\rwfc with an ACL.

  3. Add a wildcard:

    rwfc wildcards add --name dev-builds "C:\Users\Jean\code\**\target\*\*.exe"
    

    target\*\*.exe covers the programs in target\debug and target\release. Avoid target\**\*.exe: it also matches every cargo build script (target\debug\build\…) and test binary (target\debug\deps\…), several hundred files per target folder that never use the network; one machine collected 1,212 rules that way, only 22 of them for actual programs.

rwfc also detects new programs through blocked connections (event 5157). This needs the audit policy "Filtering Platform Connection" (Failure) to be enabled. rwfc does not change it itself; rwfc status shows under block_events whether it is available. To enable it:

auditpol /set /subcategory:"{0CCE9226-69AE-11D9-BED3-505054503030}" /failure:enable

Choosing a filter profile (next section) enables it automatically and restores the previous setting when the profile is released.

Filter profiles and notifications

By default rwfc only manages rules; firewall on/off and the default actions stay as they are ("not managed"). Choosing a profile hands them to rwfc:

Profile Effect (all three network profiles)
High Firewall on, everything blocked, even programs with an allow rule.
Medium Firewall on, inbound and outbound blocked unless a rule allows it. Blocked programs without a rule cause a notification.
Low Firewall on, outbound allowed unless a rule blocks it.
Off Firewall off (the UI asks for a second click).
rwfc profile                  # current profile, firewall state, saved original state
rwfc profile set medium       # needs a running, enabled service
rwfc profile set low --for 1h # for a while: back to the previous profile afterwards
rwfc profile release          # give the firewall back: restore the saved state
rwfc notifications            # open notifications
rwfc notifications allow <id> --for 1h     # or --until-restart, or permanent without option
rwfc notifications block <id>
rwfc notifications ignore <id>
rwfc notifications off        # or on
rwfc notifications learn on --hours 72     # learning mode, see below
rwfc notifications exceptions add 'C:\Games\**'   # never ask for these programs
rwfc rules add --name tool --program C:\Tools\tool.exe --for 5m   # temporary rule
  • The first switch saves the original state (firewall on/off, default actions per network profile, the audit setting). rwfc profile release and rwfc reset restore exactly that state and remove the profile's rules.
  • If another program changes the settings, rwfc restores them; after three restores within ten minutes it stops and reports a conflict until the next rwfc profile set.
  • Notifications appear in profile Medium for programs without an rwfc rule. Identical attempts are merged, at most 50 stay open, and an ignored program stays quiet for 10 minutes.
  • Temporary rules (5 min, 1 hour, until restart) are removed automatically, also after a restart of the service.
  • A profile switch can carry a time limit (1 minute to 24 hours, --for 15m): afterwards the service switches back to the profile that was active before, also after a restart. A second timed switch keeps the first return target; a switch without a limit or rwfc profile release cancels the return. In rwfc-ui: right-click the profile switch ("for 15 minutes, 1 hour, 4 hours"), or the tray's "For a while"; the header shows "back to Medium at 14:35" with "Return now" and "Keep" (spec 010).
  • Notification exceptions: program paths or patterns like wildcard rules (C:\Games\**) that never ask in profile Medium and are never learned. They stay blocked and appear in the history; no rule is created. Edit them with rwfc notifications exceptions add|remove, on the Settings page of rwfc-ui or with "Never ask for this program / for programs in this folder" in a notification's menu.

Learning mode

Like WFC's learning mode: in profile Medium a blocked program with a valid signature (embedded or Windows catalog, checked offline by the service) gets a permanent outbound allow rule right away instead of a notification; unsigned programs still ask. Helpful for the first days after switching from another firewall.

rwfc notifications learn on            # or: on --hours 72 (turns itself off afterwards)
rwfc notifications learn               # state, number of learned rules, exclusions
rwfc rules list --origin learning      # what was learned (signer in the description)
rwfc notifications learn off           # ask about every new program again
  • Off by default. Only a human can turn it on (CLI, the status popover or the tray menu of rwfc-ui); MCP clients are refused.
  • Never learned: unsigned programs, a svchost.exe that hosts several services, programs with a malware hash match or with any outbound rwfc rule (a narrower rule of yours is not widened).
  • Turning learning on also decides open notifications of signed programs.
  • Deleting a learned rule excludes its program, so it asks again instead of being learned once more; rwfc notifications learn include <program> lifts that.

Program details and statistics

rwfc program "C:\Users\me\AppData\Local\Updater\update.exe"   # also --json
rwfc blocked --stats                 # last 7 days: per hour, top programs, top addresses
rwfc blocked --stats --hours 24 --top 5

rwfc program reads the file itself, with your rights (the service never reads files for a client): version resource (description, company, product, versions, original name, copyright), signature (embedded or Windows catalog, checked offline) and signer, architecture, console or GUI, build time, size, dates and SHA-256 (files up to 256 MB). MCP offers the same as get_program_info and get_blocked_stats.

Filter lists

All lists are off after installation. Enabling one writes firewall rules (block, in and out, for every program), so it is your decision:

rwfc lists                           # state, entries, rules, last and next update
rwfc lists enable feodo              # downloads now, then every 24 hours
rwfc lists enable spamhaus-drop-v4
rwfc lists update                    # download all enabled lists now
rwfc lists check 1.10.16.5           # which lists contain an address (or a SHA-256, or a file)
rwfc lists except 203.0.113.0/24     # never block this by lists ('rwfc lists exceptions')
rwfc blocked                         # the NOTE column names the list that blocked a connection
  • Built-in: spamhaus-drop-v4, spamhaus-drop-v6, firehol-level1, feodo (IP) and malwarebazaar (SHA-256 of malware). Own sources: rwfc lists add --name … <https-url> [--kind hash] [--interval 12], rwfc lists remove <id>.
  • Private, loopback, link-local and multicast ranges are never blocked. An update that is empty, mostly invalid or shrank by more than half is rejected; the last valid version stays active and the reason is shown. Valid versions are cached, so the rules return after a restart without network.
  • In profile Medium, rwfc adds one allow rule for its own downloads (TCP 443) while a list is enabled; in High, updates pause.
  • MalwareBazaar needs a free abuse.ch Auth-Key (https://auth.abuse.ch/): rwfc lists configure malwarebazaar --auth-key <key>. The key stays in the service and is never shown or logged. rwfc then checks the programs of allow rules and of blocked connections; a listed program is blocked completely and an alert is raised. rwfc hashes shows matches, rwfc hashes allow <file> adds an exception for exactly that file content (CLI and UI only, not MCP), rwfc hashes disallow <file> removes it.

Rule guard

Installers and programs with administrator rights can add their own firewall rules, e.g. an inbound allow rule for a game launcher, which silently bypass rwfc's notifications. With the rule guard on, rwfc reports such rules within 30 seconds and you decide:

rwfc guard on                        # the rules of other programs that exist now are accepted
rwfc guard                           # rules to review (id, count, ports, group, program)
rwfc guard accept review:3063b4f581000615
rwfc guard disable review:8eade8d5b64e7b8f   # turns the rule off, listed under "disabled by the guard"
rwfc guard enable review:…           # turns it back on
rwfc guard accept --all              # e.g. after a Windows feature update
rwfc guard trust "Windows Firewall Control"   # rules of this group are accepted automatically
rwfc guard off
  • Off by default. "New" means a rule of another program whose content (name, group, program, service, direction, action, protocol, ports, addresses, enabled, profiles; not the description) was not accepted, so a widened rule is reported as well. Identical rules form one item.
  • The guard never deletes: rwfc reads only part of a rule's settings and could not restore a deleted rule exactly. Disabling is fully reversible; delete in wf.msc if you want to.
  • Only a human decides (CLI or rwfc-ui); MCP clients can read the list (list_rule_reviews). Every detection and decision is in the change log; one alert counts what waits.
  • rwfc-ui: the navigation counts rules to review on "Rules", the Rules page has a "To review" filter with "Accept all", the details panel and the right-click menu offer Accept and Disable, and the status popover switches the guard.

Network monitor

The firewall only reports what it blocks. The network monitor shows the allowed traffic too, like GlassWire: which program talks to which host, how much it sends and receives, and which program used the network for the first time.

rwfc traffic                         # last 24 hours: download, upload, connections per program
rwfc traffic --hours 1 --top 10
rwfc connections                     # the connection log, newest first (host, port, bytes)
rwfc connections --program firefox --since 1h --internet
rwfc connections --text github
rwfc monitor                         # on / off / not available (with the reason)
rwfc monitor off                     # stops recording; the history stays until it expires
rwfc monitor clear                   # deletes everything recorded
  • The service reads it from Event Tracing for Windows: the kernel network provider (TCP and UDP sends and receives with process, addresses, ports and size) and the DNS client (names this machine resolved). Only metadata, no packet contents, no driver. The trace session is private to the service and ends with it; nothing on the system changes.
  • Loopback is ignored. Host names come only from the machine's own DNS lookups (a browser that uses DNS over HTTPS shows addresses); the Blocked page shows them as well.
  • Kept under the service's data directory (monitor\): bytes and connections per program and hour for 30 days, the connection log (one entry per day, program, protocol, address and port) for 7 days, at most 20 000 entries per day. The live graph (last hour per second) stays in memory. Written every 5 minutes and when the service stops.
  • A program is marked "new" for 24 hours after its first network activity; the first hour after the monitor starts is the baseline.
  • On by default. Turning it off and clearing it are writes (MCP needs the write lock) and are in the change log. MCP: get_traffic_stats, list_connections, set_monitor, clear_monitor_history.
  • rwfc-service traffic-probe --seconds 10 (elevated, read-only) prints what the trace sees: the busiest endpoint pairs and the resolved names. It helps when the monitor reports nothing.

MCP

The System page of rwfc-ui registers rwfc-mcp.exe with Claude Code (claude mcp add --scope user) and Claude Desktop (claude_desktop_config.json, a .bak copy first; restart Claude Desktop afterwards). Without the window:

rwfc mcp setup status                  # where rwfc-mcp is registered
rwfc mcp setup claude-code [--remove]
rwfc mcp setup claude-desktop [--remove]
claude mcp add rwfc -- "C:\Program Files\rwfc\rwfc-mcp.exe"   # the same by hand

Access has three levels, set by a human (admin): the System page (after a UAC prompt) or rwfc mcp access off|read|write in an elevated shell. Every change is in the change log.

  • Read-only (default): an agent can read rules, wildcards, previews, blocked connections, alerts, the change log and settings.
  • Read and write: it can also change rwfc's rules and settings (rwfc mcp write on|off still works).
  • Off: rwfc refuses every request of rwfc-mcp, reads included (E_MCP_OFF). This stops the MCP server, not an agent that may run programs: such an agent can still use the rwfc CLI with your rights, as before.
  • Every write tool requires a reason, which ends up in the change log (rwfc audit).
  • Reset, re-enabling and service control are deliberately not available to agents.

Desktop interface

Start menu entry rwfc (created by the install script) or rwfc-ui.exe. The install script also starts rwfc-ui --background at every logon: a tray icon (the rwfc shield of bricks) whose brick colour shows the profile (red High, green Medium, amber Low, dark grey Off, blue not managed, light grey: service not reachable), with a white dot while notifications wait, and whose menu switches profiles and notifications. Notifications appear in a small window in the bottom right corner without taking the focus: Allow, Block (permanent, 5 min, 1 hour or until restart), Ignore, "Edit rule…" and "Wildcard for folder…". rwfc-ui runs once per user; starting it again opens the window of the running instance. Closing the window keeps the tray icon; "Quit rwfc-ui" in its menu ends it.

The window has a one-row header: a status button ("Connected", "2 issues", "Service not reachable", …) whose popover lists every detail (pipe, backend, profile with "Give the firewall back", notifications, the learning mode, the rule guard, rule counts, alerts, block events, file watcher, MCP), the profile switch (the tooltips explain each profile), a notifications bell and refresh. Problems that stop rwfc (service not reachable, disabled) also show a hint with the command. The navigation counts decisions waiting (Blocked), rules to review (Rules) and open alerts. Pages:

  • Overview: blocked attempts in the last 24 hours and 7 days, open notifications, profile and rules as tiles; bar charts per hour and per day; the most blocked programs and destinations.
  • Wildcards: create, edit, enable, disable and delete, with a live preview of the matching programs while you type the pattern.
  • Rules: all firewall rules with search and filters (owner, direction, action, learned, to review); create, enable, disable and delete your own manual rules. Rules of other programs and rules derived from wildcards are read-only, except for the rule guard's Accept, Disable and Enable again.
  • Blocked: open notifications with Allow, Block and a "⋯" menu (Ignore, Never ask…, Edit rule…, Wildcard…, Explorer, copy path), and the blocked connections of the last 7 days (repeated attempts counted) with "Allow" and "Wildcard…". Both lists only render the visible rows.
  • Network: the live graph of download and upload (5 minutes or 1 hour), the programs with download, upload and current rate in a period (1 hour to 30 days, "new" marks programs seen for the first time), and the connection log with host names, "Internet only" and a text filter. A click on a program shows its connections; the right-click menu of a connection offers Block or Allow this program, the lookups and copy. The switch turns the monitor off, "Clear history…" deletes it.
  • Lists: the filter lists with switch, state and "Update now", the exception list, hash matches with "Allow this file", and own sources; the Blocked page names the list that blocked a connection.
  • Alerts and Change log.
  • System: the Windows service (state, start type, program, version) with Start, Stop, Restart and the start type, and the AI agents: the MCP access level and the registration of rwfc-mcp in Claude Code and Claude Desktop, plus the command and a JSON entry for other clients. While the service is not reachable, the hint and the status popover offer the fitting action (Start, Enable and start, Install, Restart).

Lists sort by a click on a column header (Network programs and connections, Change log; a second click reverses) or with "Sort:" and the arrow next to it (Rules, Blocked). Text sorts A→Z regardless of case, amounts and times largest first; the live "Now" rate does not sort. Lists the service sends shortened (newest 200 blocked connections and change log entries, newest 500 connections) are sorted within what was loaded. The choice is kept per list in %APPDATA%\rwfc\ui-settings.json.

The rule and wildcard forms ("New rule", "New wildcard", "Edit…" in a row menu or the rule details, "Create duplicate…", "Customize and create…", "Edit rule…", "Wildcard…") open as a dialog over the page you are on, with the cursor in the first field: Tab moves between the fields, Enter in a field saves, Escape or × cancels, and the page below keeps its place.

Wherever a program appears (notification window, Blocked page, Overview) it shows its icon and "description · company · version" from the file; hovering over the name shows everything the file contains, and the folder and copy buttons open Explorer at the file or copy its path.

Like the CLI, it talks to the service over the pipe (client gui, every change is logged with the reason "via rwfc-ui"). rwfc-ui never runs elevated: for administrator actions (enable, service control, MCP access) it starts rwfc.exe next to it after a UAC prompt and reads the outcome from a named pipe with a random name; a declined prompt changes nothing. Reset stays in the CLI. With --pipe other than the default, the System page shows the Windows service but hides its actions. For development: rwfc-ui --pipe rwfc-dev [--page blocked] [--background], and rwfc --pipe rwfc-dev dev inject C:\Tools\curl.exe 93.184.215.14 443 [--ago 3h] [--count 5] feeds a blocked connection into a development service (memory backend). Start the development service with --no-downloads to keep it offline and feed list content with rwfc --pipe rwfc-dev dev list-content feodo ipblocklist.txt; rwfc --pipe rwfc-dev dev foreign-rule <name> --program <path> [--ports 27036] [--group G] plays another program that adds a rule (--remove deletes it). rwfc --pipe rwfc-dev dev traffic <program> <address> <port> [--received B] [--sent B] [--udp] [--inbound] [--host NAME] feeds traffic into the network monitor. With RWFC_UI_FRAME_LOG=<file> set, the main window appends its render-to-paint time per frame (ms) to that file; RWFC_UI_OPEN_EDITOR=rule|wildcard|edit-rule|edit-wildcard|note-rule|note-wildcard opens that dialog once the data is there (for screenshots without clicking).

The icon lives as SVG in crates/rwfc-ui/assets/ (rwfc.svg, plus the pixel-aligned rwfc-24.svg and rwfc-16.svg for small sizes). cargo run -p rwfc-ui --example make-icon regenerates rwfc.ico (16–256 px) offline; a unit test fails while it is stale. The build scripts embed it as resource 1 with version information into rwfc-ui.exe, rwfc.exe and rwfc-service.exe (rc.exe from the Windows SDK via embed-resource, llvm-rc when cross-compiling).

Screenshots

The installed rwfc on 2026-11-13 with real data, profile Medium. Each page was opened with rwfc-ui --page <page> and captured with PrintWindow. Click an image for full size.

Overview
Overview
Wildcards
Wildcards
Rules
Rules
Blocked
Blocked
Network
Network
Lists
Lists
Alerts
Alerts
Change log
Change log
Settings
Settings
System (2026-11-21, development service: the service actions are hidden)
System

Running alongside WFC

While WFC is still running, "Secure Rules" must be turned off there, or the rwfc rules must be authorized in WFC. Otherwise WFC deletes rwfc's rules. rwfc restores them and reports a conflict after three attempts within ten minutes (rwfc alerts). A conflict usually means exactly this.

If you try rwfc's rule guard while WFC runs, rwfc guard trust "Windows Firewall Control" keeps WFC's own rules from being reported.

Do not choose a filter profile in rwfc while WFC runs. Both would set the default actions and the notifications would appear twice; rwfc would report a profile conflict. Uninstall WFC first (or at least stop it from managing the profile), then run rwfc profile set medium. As long as rwfc's profile is "not managed", both can run side by side.

Undo and uninstall

rwfc profile release    # restores the firewall settings saved before rwfc managed the profile
rwfc reset              # removes all rules of group rwfc, restores the firewall settings and
                        # disables rwfc (admin)
rwfc enable             # re-enables rwfc and re-creates its rules
rwfc service uninstall  # runs the reset first, then removes the service

Installed with the installer: uninstall rwfc in "Apps" (see Installer and releases). Installed with the script: double-click scripts\uninstall.cmd; it runs rwfc service uninstall, removes C:\Program Files\rwfc\ and its PATH entry, and asks whether to delete %ProgramData%\rwfc.

rwfc reset also works without a running service. The data in %ProgramData%\rwfc is kept; delete the folder by hand if needed.

Emergency without rwfc (PowerShell as administrator):

Remove-NetFirewallRule -Group rwfc

netsh advfirewall firewall delete rule has no group filter and cannot be used for this.

Tests

  • cargo test --workspace runs without administrator rights and without touching the system (memory backend, service in-process, MCP server as child process).

  • The system tests against the real firewall only work in the group rwfc-test and only run on explicit request. Start them by double-clicking scripts\system-test.cmd; Windows then asks for administrator rights (UAC). Or in an elevated shell:

    powershell -ExecutionPolicy Bypass -File scripts\system-test.ps1
    

    Before and after the run, the script independently checks that rules of other programs are unchanged and that rwfc-test is empty.

S
Description
Rust Windows Firewall Control: wildcard program rules, CLI and MCP server for Windows Defender Firewall (WFC replacement)
Readme
2.2 MiB
rwfc 0.2.0
Latest
2026-11-21 12:07:38 +00:00
Languages
Rust 93.9%
PowerShell 5.2%
NSIS 0.8%