python-eduvpn-client
python-eduvpn-client copied to clipboard
NetworkManager config can not be customized
Installation
apt install eduvpn-client on ubuntu 20.04
Version
eduVPN Linux client version 0.0dev
OS/Distribution
Ubuntu 20.04.1 LTS
Do you have a problem during connecting?
We need to exclude some routes from the vpn. The canonical way to do this would be by using nm-connection-editor, Or editing /etc/NetworkManager/system-connections/xxxxxx.nmconnection. The eduvpn client overwrites this file each time it is started with default settings, making it impossible to cusomize settings.
Is it possible for you to let the eduvpn config server push this configuration? that would solve this issue.
It would, unfortunately we don't control the server. Also, as this server will be used by different departments (tu delft) with different needs, there has to be a way to customize the client. For windows clients, we can adjust the C:\Program Files\eduVPN\Core\eduVPN.Client.exe.config file
maybe we can merge the settings, lets see what we can do. thanks for reporting.
@alvra maybe you can rewrite the .ovpn configuration before injecting it in networkmanager
for windows there is an "OpenVPNRemoveOptions" and "OpenVPNAddOptions" that is configurable in a configuration file. From the documentation: OpenVPNAddOptions:"Custom options to be added to OpenVPN profile configuration. This string is appended to the OpenVPN profile configuration file (OVPN) and should conform to the OVPN file syntax. It can contain multiple lines to specify multiple OpenVPN options. Use in combination with OpenVPNRemoveOptions setting to override the OpenVPN options provisioned by the VPN provider."
Have not tested how/if this works with networkmanager
The plan is to allow users to customize the config by supporting a customization file, which if present is appended to the standard ovpn file. Something like: ~/.config/eduvpn/customization.ovpn
What about "hooks", where we can allow the user to specify certain kind of scripts that must be run when the vpn is activated? Maybe this already exists in networkmanager? Anyhow we must document this
Closing due to inactivity, this is already possible with dispatcher hooks https://networkmanager.dev/docs/api/latest/NetworkManager-dispatcher.html. If there are some examples that we should provide, let us know