docs(tproxy): document the src_valid_mark=0 prerequisite (silent martian drop) - #214
Open
Scared-Heart wants to merge 1 commit into
Open
Scared-Heart wants to merge 1 commit into
Scared-Heart wants to merge 1 commit into
Conversation
If net.ipv4.conf.all.src_valid_mark is 1, forwarded connections get their fwmark used in fib_validate_source()'s reverse-path lookup, land on the local route (RTN_LOCAL) and are dropped as martian sources by ip_handle_martian_source(), which touches no /proc/net/snmp counter and logs nothing by default. Result: all LAN clients lose Internet access while the router itself is fine, with every log and counter looking healthy. Tailscale 1.98+ (NetfilterMode=on by default) sets this sysctl on startup.
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
Adds a warning to the TPROXY listener page (
docs/config/inbound/listeners/tproxy.{md,en.md}) documenting akernel prerequisite that is easy to get wrong and produces a completely silent failure:
net.ipv4.conf.all.src_valid_markmust be0.The sysctl is evaluated as
max(conf/all, conf/<iface>), so setting it to0for a single interface (e.g.br-lan) is not enough —conf/allwins. When it is1, forwarded connections get their fwmark used in thereverse-path lookup inside
fib_validate_source(), land on the local route (RTN_LOCAL) and are dropped asmartian sources by
ip_handle_martian_source(), which does not touch any/proc/net/snmpcounter and does notlog by default (
log_martians=0).Symptom seen by users:
skb_dstset and never take this check),InAddrErrors,ListenDrops).Common trigger: Tailscale 1.98+ (default
NetfilterMode=on) writes this sysctl on every startup(tailscale/tailscale#19796). The only observable evidence on the host is the internal route counter
in_martian_srcin/proc/net/stat/rt_cachegrowing with LAN traffic.The kernel documentation for
src_valid_markalready calls this out:Notes
tproxy.ru.mdis intentionally not touched — I can't produce a correct Russian translation.Happy to have a native speaker follow up, or I can drop the section if the maintainers prefer
keeping all three languages in sync.
uv run mkdocs build(bothsite/config/inbound/listeners/tproxy/andsite/en/config/inbound/listeners/tproxy/render the new admonition).