drok / ovpn

OVPN is a derivative of OpenVPN focused on infrastructure quality improvements.
https://ovpn.ohmi.org
Other
0 stars 0 forks source link

Bypass to server uses wrong interface #10

Open drok opened 4 years ago

drok commented 4 years ago

When a bypass route is added to the VPN server, the client assumes the route goes through the default gateway, which is wrong.

Eg, asume the routing table:

192.168.254.96/28 via 192.168.254.33 dev eth1
default dev eth0  scope link

Assume the server is 192.168.254.98

The client adds the wrong tunnel bypass route (through eth0): /sbin/ip route add 192.168.254.98/32 dev eth0

The correct bypass route goes through eth1, and should be: /sbin/ip route add 192.168.254.98/32 dev eth1