Follow-up: Android: access LAN when connected to ZeroTier and routing all traffic through it

As my previous topic got locked, I’d like to follow up here.

@matrixxx Thanks for the tip, Mike. My issue seems to be different from yours, and downgrading the app didn’t help.

I figured out a workaround that works on a rooted phone:

ip rule add to pref 1 table main

(replace with your physical LAN subnet). The main table doesn’t have the VPN default route, so LAN traffic will go to the LAN as expected, while other traffic goes through ZeroTier.

One more thing I’d like to address is my claim that LAN access works out of the box on some Android kernels. It may not be related to the kernel, but rather to the fact that I was connected to different LANs (with different route metrics and/or DHCP options).