Skip to content

docs: warn about firehol_level1 RFC1918 gotcha in default blocklist#467

Merged
9seconds merged 2 commits into9seconds:masterfrom
dolonet:docs/blocklist-lan-gotcha
Apr 14, 2026
Merged

docs: warn about firehol_level1 RFC1918 gotcha in default blocklist#467
9seconds merged 2 commits into9seconds:masterfrom
dolonet:docs/blocklist-lan-gotcha

Conversation

@dolonet
Copy link
Copy Markdown
Contributor

@dolonet dolonet commented Apr 13, 2026

Summary

Follow-up to #466. The default [defense.blocklist] uses firehol_level1.netset, which includes bogon networks and therefore all RFC1918 ranges. Clients connecting from the same LAN as mtg (typical home setup: phone on Wi-Fi, mtg on a home server) are silently rejected with ip was blacklisted and routed to the fronting domain. This keeps tripping people up.

This PR is docs-only and does not change the default behavior:

  • example.config.toml: a short NOTE block next to [defense.blocklist].urls describing the gotcha and pointing to the README.
  • README.md: a new ## Troubleshooting section before ## Metrics with the symptom (including the exact log line), the cause, and three resolution paths (disable the blocklist, swap for a narrower list like firehol_abusers_1d, or use hairpin NAT).

No defaults are changed — that is a separate discussion and I didn't want to couple it with a doc fix. Happy to open a follow-up issue/PR if you'd like to revisit the default list choice.

Refs #466.

Test plan

  • example.config.toml still parses as TOML (only comment lines added).
  • README renders correctly on GitHub (verified locally against existing code blocks).
  • No behavior/code changes — docs only.

The default [defense.blocklist] uses firehol_level1.netset, which
includes bogon networks and therefore all RFC1918 ranges. Clients
connecting from a LAN address (e.g. a phone on the home Wi-Fi when
mtg runs at home) are silently rejected with "ip was blacklisted"
and routed to the fronting domain. This is a recurring source of
confusion (see issue 9seconds#466 for the latest example).

Add a warning next to the urls list in example.config.toml and a
Troubleshooting section in README.md covering the symptom, the
cause, and three resolution paths (disable blocklist, swap for a
narrower list, or use hairpin NAT).

Docs only, no code changes.
The previous wording ("silently routed to the fronting domain")
is inaccurate. In mtglib/proxy.go the blocklist path calls
conn.Close() immediately with no further handshake or fronting;
domain fronting only happens on FakeTLS failures for non-blocked
IPs. Reword to "TCP connection is closed with no response" so
users searching the docs get the same symptom they actually see.
@9seconds 9seconds merged commit 9bf7222 into 9seconds:master Apr 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants