Node HandbookNODE HANDBOOK中文
Troubleshooting

Clash can't reach your LAN: router, NAS and internal domains

Your browser loads public sites fine, but 192.168.1.1 times out, the NAS disappears, or an internal hostname won't resolve. These are three different failures. Here is how to tell them apart in one pass, and the exact config to fix each.

Node Handbook editorial team · Verified 2026-11-18
Short answer
  • LAN addresses timing out is almost never a node problem. Check whether the private ranges match a DIRECT rule before you switch servers.
  • Under TUN, all three private ranges must be listed explicitly. Otherwise the default route sends them through the tunnel.
  • Hostname-based devices add a second failure mode: fake-ip resolves them to a synthetic address, so even a correct rule can't connect.
  • System proxy mode normally leaves LAN alone. If your LAN breaks the moment you enable something, that something is TUN.

1. Identify which layer took over

Run one check first. The result tells you which of the three sections below applies, and saves you from editing rules for a DNS problem.

SymptomLayer involvedCheck first
Browser fails, ping 192.168.1.1 succeedsSystem proxy (per-app)Proxy bypass list
ping succeeds but the admin page won't loadRules send the range to a proxy grouprules: private ranges set to DIRECT
ping fails too, printer and NAS drop outTUN took over the routing tableTUN LAN bypass and routing
IP works, hostname does notDNS side: fake-ip hijackfake-ip-filter

If two rows match, work on the lower one. A TUN routing problem hides the other two, so fixing rules first is wasted effort.

2. Case A: direct IP fails

The browser spins on 192.168.1.1 or 192.168.1.20 while public sites keep working.

Cause: the connection matched a proxy group. Clash-like clients hand anything that matches no rule to the MATCH policy, which usually points at a proxy. Private ranges with no explicit rule go through the proxy — and your proxy server has no idea where your router is.

Confirm: open the client's connections or log panel, hit the LAN address again. If that connection shows a node name instead of DIRECT, this is your case.

Fix: put the three private ranges at the very top of rules, above MATCH. Snippet in section 5.

The no-resolve flag is easy to miss. Without it, the client performs a DNS lookup to evaluate IP-CIDR against a hostname. For a bare IP this changes nothing; for internal hostnames it leaks the query upstream and makes resolution more likely to fail.

3. Case B: hostname resolves but nothing connects

nas.lan, router.local or printer.home.arpa fails, while the same device by IP works. Rules may be fine — this is DNS.

Most Clash-family clients run fake-ip: the client intercepts DNS and returns a synthetic address (commonly in 198.18.0.0/16) immediately, then matches rules by hostname once the real connection starts. That is necessary for public domains and fatal for LAN devices, which have no public domain to resolve. The synthetic address never reaches the real device.

Confirm:

  • nslookup nas.lan (Windows) or dig nas.lan returns 198.18.x.x → fake-ip hijack is active
  • It returns the real LAN address (e.g. 192.168.1.20) → not a fake-ip problem; go back to Case A

Fix: add the suffixes to fake-ip-filter so they skip the synthetic path and resolve for real. *.lan, *.local and *.home.arpa cover most home networks. Corporate suffixes must be listed individually.

Order trap: fake-ip-filter only matters while enhanced-mode is actually fake-ip. If DNS is set to redir-host or DNS takeover is off, editing the filter changes nothing. Check the current mode first.

4. Case C: TUN makes the whole LAN disappear

Everything is fine under system proxy. Enable TUN and the router, NAS and network printer all vanish — even ping to the gateway fails.

Cause: TUN creates a virtual interface and takes over the routing table, so all traffic including private ranges enters the tunnel. This differs from system proxy, which only affects apps that respect the system proxy setting. TUN affects everything.

Check in this order, one change at a time:

  1. ip route (Linux/macOS) or route print (Windows): does the default route point at the virtual interface?
  2. ping the gateway. If it fails, routing was hijacked before rules ever ran.
  3. Disable TUN and ping again. Recovery confirms TUN as the cause, not a driver issue.

Fix: besides the three DIRECT rules in section 5, check whether your client exposes a "bypass LAN" style toggle (naming varies; usually under TUN or routing settings). That toggle decides whether the virtual interface writes private ranges into its own routing table — it does not edit rules. Both must be right.

Note: do not whitelist internal hostnames with DOMAIN-SUFFIX alone while TUN is on. The hostname resolves to a synthetic IP first, the rule matches that synthetic IP, and the whitelist never fires.

5. Config you can paste

Clash/Mihomo syntax. Field names are the same in Clash Verge Rev, FlClash and Hiddify; only the editor location differs.

rules:
  # private ranges must come before any proxy rule and before MATCH
  - IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
  - IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
  - IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
  - IP-CIDR,127.0.0.0/8,DIRECT,no-resolve
  - DOMAIN-SUFFIX,lan,DIRECT
  - DOMAIN-SUFFIX,local,DIRECT
  - DOMAIN-SUFFIX,home.arpa,DIRECT
  # add your own corporate suffix, e.g.
  # - DOMAIN-SUFFIX,corp.example.com,DIRECT
dns:
  enhanced-mode: fake-ip
  fake-ip-filter:
    - '*.lan'
    - '*.local'
    - '*.home.arpa'
    - '*.arpa'
    - '+.corp.example.com'

Three notes that save time:

  • 172.16.0.0/12 covers 172.16 through 172.31. Docker's default networks and several VM subnets live here. Containers that can't reach the host are usually missing this line.
  • If your rules come from a remote subscription, a local edit gets overwritten on the next update. Put these lines in the client's override/merge section, or in the pre-rules area of the profile.
  • Reload the profile after editing. Most clients have an explicit reload button; editing the file alone does nothing.

6. Verify in order

  1. Gateway reachable: ping <gateway> succeeds → routing is fine
  2. LAN by IP: open the NAS by IP → rules are working
  3. Resolution: nslookup nas.lan returns 192.168.x.x → fake-ip-filter is working
  4. Hostname: open http://nas.lan → everything is connected

Step 2 passes but 3 fails: the problem is DNS. Step 1 already fails: it's TUN routing and rules never ran. Fixing this order into habit beats toggling TUN repeatedly.

If LAN works but public access got worse, that's a different problem: see TUN mode connected but no internet for the three-state baseline. To confirm the current exit IP and DNS resolver, use the IP check page.

FAQ

Disabling TUN restores the LAN but pages get slower. Why?

Without TUN, traffic falls back to the system proxy, so only apps that honour the system proxy are proxied and everything else connects directly. The LAN recovers because the virtual interface is gone. Pages feel slower because apps that never used the system proxy — games, CLI tools — were direct all along, and now nothing looks like it is "using the proxy".

I added IP-CIDR DIRECT rules and it still fails. What now?

Three usual causes: the rules sit below MATCH and never match; the profile was not reloaded; the target is a hostname hijacked by fake-ip, so the rule matched a synthetic address. The four-step check in section 6 identifies which one.

How is Android's "bypass LAN" different from a DIRECT rule?

The system VPN bypass excludes LAN traffic at the OS level, so the client never sees those connections. A DIRECT rule lets the traffic into the client and then releases it. The first is more thorough, the second keeps logs and statistics. They don't conflict.

Our intranet uses a domain that isn't under .lan. Can I use a wildcard?

No. Add the exact suffix twice: DOMAIN-SUFFIX,your.domain,DIRECT in rules, and +.your.domain in fake-ip-filter. Also confirm the client is not forwarding that domain to a public resolver — that returns NXDOMAIN regardless of your rules.

Why can't I reach services running in Docker?

Docker's default bridge networks sit around 172.17.0.0/16, inside 172.16.0.0/12. Without that DIRECT rule, container traffic tries to go out through the proxy and fails. Add the line and reload.