Repository navigation
net: static route via a LAN gateway masquerades LAN traffic to its target - #130
Merged
Merged
Conversation
…to its target Replies came straight back from the gateway, the router only saw one direction and conntrack dropped the connection as invalid. Closes #129
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.
What
mod_net_render.go: for every IPv4 main-table static route whosevialies in a LAN-side network, srcnat getsiifname "<br>" oifname "<br>" ip saddr <net> ip daddr <target> masquerade comment "route-via-lan:<target>". Test:TestLANGatewayRouteNAT; docs indocs/modules/net.md.Why
With e.g.
{target: 10.77.0.0/24, via: <downstream router on the LAN>}, a LAN device's packets to the target go through the router, but the gateway answers the device directly on the shared LAN. The router never sees the SYN-ACK, so the device's next packets arect state invalidand dropped in forward.Verification
sudo ./tools/ci.sh: ALL CHECKS PASSED.Closes #129