openwrt openvpn

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
frank54772
OpenVpn Newbie
Posts: 2
Joined: Fri Aug 19, 2022 7:11 am

openwrt openvpn

Post by frank54772 » Fri Aug 19, 2022 7:18 am

my topo
Image

traceroute output from op4 to op7
Image

log of op3
Image

log of op5
Image

my traffic should go through openvpn,not static route,how to fix it

User avatar
ordex
OpenVPN Inc.
Posts: 444
Joined: Wed Dec 28, 2016 2:32 am
Location: IRC #openvpn-devel @ libera.chat

Re: openwrt openvpn

Post by ordex » Sun Sep 11, 2022 11:06 pm

let's say this is "unrelated" to OpenVPN.
You scenario can be reformulated as if op3 and op5 have two ways to reach each other:
* direct link (in your case this is the VPN)
* via switch

op3 decides which link to route traffic through based on its own routing table.
In your case it is likely that the route via switch has a lower metric (higher prio) compared to the one over othe VPN link.
Depending on your needs, you can either:
1) change the metric to invert the priority or
2) use policy routing to route only specific traffic over the VPN link.

If you go with 1), make sure a static route towards the other VPN peer is installed (otherwise op3 would try to reach op5 via the tunnel and the VPN would break).

If you have troubles understanding the description above, please paste your routing tables and I can help pointing out the issue.

Post Reply