[5.0.0.67][C2] Wireguard - Selected routed networks not set upon VPN activation

REPRODUCIBILITY: 100%
OS VERSION: 5.0.0.67
HARDWARE: C2
UI LANGUAGE: English
REGRESSION: n/A

DESCRIPTION:

Setting up ‘Routed networks in CIDR format’ under Wireguard network setting doesn’t setup static routing to forward traffic to selected IP addresses via wireguard interface. When added manually via terminal, it works.

PRECONDITIONS:

Working Wireguard configuration (tested on a different device for example).

STEPS TO REPRODUCE:

  1. Setup routed networks in Wireguard VPN (such as 10.0.0.0/24)
  2. Connect to VPN
  3. Try accessing anything on that IP address (http, ssh, whathaveyou…)

EXPECTED RESULT:

Connection to selected network should go through wg0 interface.

ACTUAL RESULT:

No networks from the configuration are added to the routing table. It can be checked via:

$ ip r

To add it manually, I type as root

# ip route add 10.0.0.0/24 dev wg0

MODIFICATIONS:

Patchmanager with no patches applied.
Chum and Storeman installed with some packages from both stores.
Android AppSupport.

ADDITIONAL INFORMATION:

Selection option Route all traffic bypasses this problem, but might not be an ideal solution for some wireguard setups.

I can confirm the same behaviour and the same workarounds (XA2 5.0.0.68). I also think the only missing bit is filling the routing table.

You might also look here if you want to root all traffic through Wireguard:

Hello, @WT.Sane

I also tried this, and while

AllowedIPs = 0.0.0.0/0, ::/0

works. All traffic is routed through Wireguard.

This part:

AllowedIPs = 192.168.23.0/24, 0.0.0.0/0, ::/0

only routes local traffic through Wireguard but the rest over the standard internet connection

doesn’t ‘only routes local traffic through Wireguard‘ – in both cases (5.0.0.72), all traffic is routed via wg0, while the expected result is opposite. While you’ve mentioned that your solution is for routing all traffic, I think it makes sense to correct the part about routing local traffic via wg0