I have a configured OpenVPN connection which works fine when connecting from command line
openvpn --config myconfig.conf
Now, I'd like to establish this OpenVPN connection automatically when connecting through a certain WiFi network. Network Manager provides this option but of course requires that the OpenVPN connection is configured through Network Manager.
It works fine. Local connections to the network bridged with the VPN are available, even IPv6 works. However, Network Manager does not set the appropriate gateway which means I cannot reach the Internet over IPv4 through this OpenVPN server.
In paritcular, when I connect using the command line,
nmcli device show tap0
IP4.ADDRESS: 192.168.1.100/24 IP4.GATEWAY: 192.168.1.1
but when I connect using the Network Manager GUI, it returns
IP4.ADDRESS: 192.168.1.100/24 IP4.GATEWAY: 0.0.0.0
Why does that happen? How can I fix it? My config does not contain the gateway address explicitly.
client dev tap resolv-retry infinite nobind persist-key persist-tun comp-lzo keepalive 1 7 remote 220.127.116.11 1194 udp redirect-gateway ca ca.crt cert cert.crt key key.key remote-cert-tls server tls-auth ta.key 1