wheelybird / openvpn-server-ldap-otp

A dockerised OpenVPN server using LDAP for authentication, with optional 2FA via Google Authenticator
MIT License
171 stars 72 forks source link

Cannot make split tunneling #58

Closed llamamesanti closed 1 year ago

llamamesanti commented 1 year ago

Hi, I'm trying to deploy the OpenVPN with split tunneling (so my clients don't put all their internet traffic through the VPN). I kinda managed to do it by adding this in the client.ovpn:

route <RemoteLAN> 255.255.255.0
route-nopull

It works, but it shows some warnings during the connection, as the server is trying to push some default rules (like the 0.0.0.0, configured by default by the server).

2023-02-15 14:27:04 Options error: option 'redirect-gateway' cannot be used in this context ([PUSH-OPTIONS])
2023-02-15 14:27:04 Options error: option 'route' cannot be used in this context ([PUSH-OPTIONS])_

Am I doing something wrong? How can I bypass this, and configure split tunneling? Does it exist another solution, different than mine?

Thank you so much in advance :)

llamamesanti commented 1 year ago

my mistake, i didnt see the OVPN_ROUTES. Sorry