flclash.st
English
简体中文繁體中文EnglishРусскийفارسی

HomeRecipesLiving with a work VPN

Living with a work VPN

With a work VPN and FlClash both on, the intranet often fails or the internet drops. Why each happens, and how system proxy mode, direct rules for intranet ranges, and route exclusion and excluded interfaces for the TUN adapter let them coexist.

Ingredients

  • Your company's intranet ranges (ask IT, for example 10.20.0.0/16)
  • The domain suffix the intranet uses (for example corp.example.com)
  • The company VPN client (AnyConnect, FortiClient, WireGuard and so on)

Two kinds of conflict

  1. Two virtual adapters fighting over routes: FlClash's TUN adapter and the company VPN both want all traffic; whichever starts last wins and the other stops working.
  2. Intranet traffic sent into the proxy: FlClash treats intranet addresses as ordinary traffic and sends them to a node, which of course cannot reach them.
An office building: the company network has its own rules, and the proxy has to give way
An office building: the company network has its own rules, and the proxy has to give way Martin Falbisoner, CC BY-SA 4.0

Option one: system proxy only

The easiest is to leave FlClash's TUN adapter off and use only the system proxy. The browser goes through FlClash and everything else is handled by the company VPN. Add the intranet domain suffix and ranges to the bypass domains so the browser reaches the intranet directly.

Option two: TUN with route exclusion

If the TUN adapter must stay on, keep it away from the intranet:

TUN excluding the intranet
tun:
  enable: true
  route-exclude-address:
    - 10.20.0.0/16
rules:
  - DOMAIN-SUFFIX,corp.example.com,DIRECT
  - IP-CIDR,10.20.0.0/16,DIRECT,no-resolve

route-exclude-address keeps those ranges out of the TUN adapter entirely, leaving them to the system's routes, which means the company VPN. The direct rules are a second safeguard. If the company VPN is an adapter of its own, you can also add its interface name to the excluded interfaces.

Check

  1. Connect the company VPN first, then start FlClash.
  2. Open an intranet page, then an internet page.
  3. On FlClash's Requests page, the intranet addresses should either not appear or show as direct.
The company VPN dropped after turning on strict route?

Strict route tries hard to stop traffic bypassing the TUN adapter, which makes the clash with a company VPN worse. When living with a work VPN, try with strict route off first.

Company DNS cannot resolve intranet names?

In the DNS settings, assign the company's DNS server to the intranet suffix (nameserver-policy), or simply use option one.

Read onProxy chains

Read alongside

This page covers: FlClash work VPN, Clash intranet direct, TUN route exclusion