Przeglądaj źródła

Merge pull request #467 from dolonet/docs/blocklist-lan-gotcha

docs: warn about firehol_level1 RFC1918 gotcha in default blocklist
pull/472/head
Sergei Arkhipov 3 tygodni temu
rodzic
commit
9bf7222208
No account linked to committer's email address
2 zmienionych plików z 55 dodań i 0 usunięć
  1. 44
    0
      README.md
  2. 11
    0
      example.config.toml

+ 44
- 0
README.md Wyświetl plik

@@ -514,6 +514,50 @@ This is not very necessary. Keep in mind these rules:
514 514
    you can enable `drs` setting.
515 515
 9. **If you are not sure, touch nothing!**
516 516
 
517
+## Troubleshooting
518
+
519
+### `ip was blacklisted` for clients on the same LAN
520
+
521
+If you run mtg at home and a client on the same LAN (for example, your
522
+phone on the home Wi-Fi) cannot connect, check the proxy logs for a
523
+message like:
524
+
525
+```json
526
+{"level":"info","ip":"10.0.1.1","logger":"proxy","message":"ip was blacklisted"}
527
+```
528
+
529
+The reason is that the default blocklist (`firehol_level1.netset`)
530
+includes bogon networks, which covers all RFC1918 ranges
531
+(`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). Any client
532
+connecting from such an address is rejected by the blocklist —
533
+the TCP connection is closed immediately with no response, so
534
+from the client's point of view nothing loads at all.
535
+
536
+There are three ways to resolve it:
537
+
538
+1. Disable the blocklist entirely in `config.toml`:
539
+
540
+   ```toml
541
+   [defense.blocklist]
542
+   enabled = false
543
+   ```
544
+
545
+   Simplest option if the proxy is used only by you and people you trust.
546
+
547
+2. Keep the blocklist but swap `firehol_level1` for a narrower list that
548
+   does not include bogons, for example `firehol_abusers_1d`:
549
+
550
+   ```toml
551
+   [defense.blocklist]
552
+   enabled = true
553
+   urls = ["https://iplists.firehol.org/files/firehol_abusers_1d.netset"]
554
+   ```
555
+
556
+3. Connect to the proxy through a public IP or domain name with hairpin
557
+   NAT (`MASQUERADE`) on your router. mtg will then see the client with
558
+   its public address and the blocklist will not match. This is more
559
+   work to set up but preserves full blocklist protection.
560
+
517 561
 ## Metrics
518 562
 
519 563
 Out of the box, mtg works with

+ 11
- 0
example.config.toml Wyświetl plik

@@ -316,6 +316,17 @@ download-concurrency = 2
316 316
 # A list of URLs in FireHOL format (https://iplists.firehol.org/)
317 317
 # You can provider links here (starts with https:// or http://) or
318 318
 # path to a local file, but in this case it should be absolute.
319
+#
320
+# NOTE: the default list below (firehol_level1.netset) includes bogon
321
+# networks, and therefore RFC1918 ranges as well (10.0.0.0/8,
322
+# 172.16.0.0/12, 192.168.0.0/16). If you run mtg on a home/LAN network
323
+# and connect from a client on the same LAN, that client will be
324
+# rejected with "ip was blacklisted" and the connection dropped (TCP
325
+# close, no response). If you see this, you can either disable this section
326
+# (enabled = false), replace firehol_level1 with a narrower list that
327
+# does not include bogons (e.g. firehol_abusers_1d), or connect via
328
+# a public IP/domain with hairpin NAT on your router. See README for
329
+# details.
319 330
 urls = [
320 331
     "https://iplists.firehol.org/files/firehol_level1.netset",
321 332
     # "/local.file"

Ładowanie…
Anuluj
Zapisz