No internet when connected to VPN

Edit

For OpenVPN:

Finally, playing around my two different self owned VPN servers, I've found the solution for my case.

First, check whether the server was setup using LZO or LZ4 compressions, if the server is setup using LZ4, then check whether your client supports LZ4 compression, apparently network-manager-openvpn doesn't support it, but any openvpn above 2.4 does.

For CiscoVPN, I cannot give an exact answer, but given the cases are similar I would suggest to take a look at the compression decompression methods on both server and client side.


I can confirm that I am experiencing the same problem with OpenVPN client, I also cannot ssh into the machines that are connected to the VPN server, etc.

I know it's not some DNS resolution issue, since I cannot ping ip numbers. I have checked all the basic and advanced settings, they look fine. I've tried the solution above it didn't work. I've also tried other solutions from different articles (Topic1, Topic2) with no luck.

I've checked tcpdump, all outgoing packages no incoming. traceroute doesn't go beyond the computer when VPN is on. The outputs are the same as above.

Edit: I still haven't solved the problem but I managed to scrape some details off, and a workaround. First, the problem in my case is related to the network manager. When I start the VPN connection via the command $ sudo openvpn --config vpnconfigfile.ovpn everything works fine. If I import the vpn config file to network manager and start it from there it does not work.

How do you use your VPN?

I have checked the output of journalctl -xe and I've found this:

...
nm-applet[1889]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
nm-applet[1889]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
nm-openvpn[7291]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep  5 2018
library versions: OpenSSL 1.1.0g  2 Nov 2017, LZO 2.08
NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Can't set a parent on widget which has a parent
....
nm-openvpn[7291]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay
nm-openvpn[7291]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
nm-openvpn[7291]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1569', remote='link-mtu 1570'
nm-openvpn[7291]: WARNING: 'comp-lzo' is present in remote config but missing in local config, remote='comp-lzo'
nm-openvpn[7291]: [server_E4ejDM49LNC3gjYs] Peer Connection Initiated with [AF_INET]xxx.xx.xxx.xx:xxx
nm-openvpn[7291]: Options error: Unrecognized option or missing or extra parameter(s) in [PUSH-OPTIONS]:3: block-outside-dns (2.4.4)
nm-openvpn[7291]: TUN/TAP device tun1 opened
nm-openvpn[7291]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --debug 0 7285 --bus-name org.freedesktop.NetworkManager.openvpn.Connection_22 --tun --  tun1 1500 1552 10.8.0.3 255.255.255.0 init
systemd-udevd[7292]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
NetworkManager[1010]: <info>  [1538869518.6350] manager: (tun1): new Tun device (/org/freedesktop/NetworkManager/Devices/16)
cinnamon[1870]: JS LOG: Unknown network device type, is 16
nm-applet[1889]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
nm-applet[1889]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
NetworkManager[1010]: <info>  [1538869518.6401] vpn-connection[0x561394b487d0,9ace9715-f9a7-4e9e-a602-b2ae3bbccebf,"xxx",0]: VPN connection: (IP Config Get) reply
  received.
 ....