Repository navigation
Add AllowIpForwarding option to skip boot-time IPFORWARD block (#425) - #2165
Merged
Merged
Conversation
The boot-time filters include a block on FWPM_LAYER_IPFORWARD_V4/V6 for traffic without the pass-through flags. Because the filter is added while BFE is running, it is enforced immediately and stays active for as long as filters are enabled. simplewall never adds a permit on the forward layer, so no app, service or user rule can allow forwarded traffic, which breaks Mobile Hotspot, Internet Connection Sharing and NAT'd VM switches (henrypp#425). Add a config option (off by default, so behaviour is unchanged) that skips just these two filters while keeping the rest of the boot-time filters. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
aga |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #425.
Problem
With "Install boot-time filters" enabled,
_wfp_createglobalfiltersadds a block onFWPM_LAYER_IPFORWARD_V4/_V6for traffic that has neither pass-through flag set. Because the filter is added while BFE is running, it is enforced right away, not only at boot, and stays active for as long as filters are enabled (netsh wfp show filterslists it). simplewall never adds a permit on the forward layer, so no app, service or user rule can allow forwarded traffic. That breaks Mobile Hotspot, Internet Connection Sharing and NAT'd VM switches.Change
This adds an
AllowIpForwardingconfig option,FALSEby default so behaviour is unchanged. When it's set, the two forward-layer block filters are skipped and the rest of the boot-time filters stay in place.Testing
The public
routinerepo is older than master and 3.8.7, so neither builds against it. v3.8.5 does build againstroutineat 9e13573 (its release date), so I tested the same change there. The only difference is the 2-argument_r_config_getboolean (L"AllowIpForwarding", FALSE)that 3.8.5 uses.On Windows 11 (build 26300), with Mobile Hotspot sharing wired Ethernet:
AllowIpForwardingtruenetsh wfp show filterson the patched build confirms that simplewall'sIPFORWARD_V4/V6block filters are gone. Every otherInternal\BlockBoottimefilter is still installed, including theIPFORWARDpermits for loopback. With Windows Firewall on, its own "Boot Time Filter" still blocks forwarding before the service starts, so forwarding is still blocked during startup.Windows Firewall also has to be on for the upstream profile, otherwise forwarded packets are dropped with
IPSEC_KERNEL_DROP/STATUS_DATA_NOT_ACCEPTED(details in #425). That's a separate requirement, and this PR doesn't address it.Possible follow-up: a checkbox in settings next to "Install boot-time filters".
🤖 Generated with Claude Code