When using push route on server side to bypass the vpn for a specific subnet :
push "route 1.2.3.0 255.255.255.0 net_gateway"
The network manager registers the route on tun0 instead of net_gateway interface :
NetworkManager[1149]: <info> Static Route: 1.2.3.0/24 Next Hop: 1.2.3.0
See the route in kernel :
1.2.3.0 192.168.0.1 255.255.255.0 UG 0 0 0 tun0
192.168.0.1 is on eth2
but route is registered on tun0
and traffic to 1.2.3.0/24 is sent to tun0 instead of eth2
When I launch openvpn in command line I get the correct route :
us=482299 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dns bypass-dhcp,route 1.2.3.0 255.255.255.0 net_gateway,comp-lzo yes,route-gateway x.x.x.x,topology subnet,ping 10,ping-restart 120,ifconfig x.x.x.y 255.255.255.0'
us=490292 /sbin/route add -net 1.2.3.0 netmask 255.255.255.0 gw 192.168.0.1
and the route appears on eth2
1.2.3.0 192.168.0.1 255.255.255.0 UG 0 0 0 eth2
then traffic to 1.2.3.0/24 flows through eth2 as expected
When using push route on server side to bypass the vpn for a specific subnet :
push "route 1.2.3.0 255.255.255.0 net_gateway"
The network manager registers the route on tun0 instead of net_gateway interface : 1149]: <info> Static Route: 1.2.3.0/24 Next Hop: 1.2.3.0
NetworkManager[
See the route in kernel :
1.2.3.0 192.168.0.1 255.255.255.0 UG 0 0 0 tun0
192.168.0.1 is on eth2
but route is registered on tun0
and traffic to 1.2.3.0/24 is sent to tun0 instead of eth2
When I launch openvpn in command line I get the correct route : redirect- gateway def1 bypass-dns bypass-dhcp,route 1.2.3.0 255.255.255.0 net_gateway, comp-lzo yes,route-gateway x.x.x.x,topology subnet,ping 10,ping-restart 120,ifconfig x.x.x.y 255.255.255.0'
us=482299 PUSH: Received control message: 'PUSH_REPLY,
us=490292 /sbin/route add -net 1.2.3.0 netmask 255.255.255.0 gw 192.168.0.1
and the route appears on eth2
1.2.3.0 192.168.0.1 255.255.255.0 UG 0 0 0 eth2
then traffic to 1.2.3.0/24 flows through eth2 as expected