I have functional OpenVPN server, and need to connect to it using Ubuntu 22.04. I have a working client configuration file.
When I import this file to a network manager I can connect from GUI and everything works just fine.
When I try to connect by using cli openvpn --config myfile.conf
, the connection is established but no traffic is going through VPN.
When I try to connect by placing the config file in /etc/openvpn/client/ folder and starting the service by using systemctl start openvpn-client@myfile
- connection is established but no traffic is going throught VPN.
When I say that connection is established I mean that I see in logs messages about successful connection, routes to other side being added to routing table, tun interface being activated , etc.. everything I expect is there. Only problem is that I cannot see any traffic being able to go to the tunnel.
So the question is - why it only works when I use Network Manager?
My problem is that I need to use setup not supported by Network Manager (YubiKey and TOTP), and this is first step to be able to setup VPN tunnel without using NM.
How to setup VPN connection without using network manager? Any hint is appreciated.