1

I have no access to internet after I start up the VPN connection.

Without VPN Connection:

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    0      0        0 wlp4s0
default         _gateway        0.0.0.0         UG    600    0        0 wlp4s0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 wlp4s0
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp4s0

$ ip route show
default via 192.168.0.1 dev wlp4s0 
default via 192.168.0.1 dev wlp4s0 proto dhcp metric 600 
169.254.0.0/16 dev wlp4s0 scope link metric 1000 
192.168.0.0/24 dev wlp4s0 proto kernel scope link src 192.168.0.9 metric 600

With VPN Connection (route/ip route show/ifconfig):

$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     0      0        0 tun0
default         ta-bb.localdom. 0.0.0.0         UG    600    0        0 wlp4s0
87.54.37.61     ta-bb.localdom. 255.255.255.255 UGH   0      0        0 wlp4s0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 wlp4s0
172.17.5.0      0.0.0.0         255.255.255.0   U     0      0        0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp4s0

$ ip route show
default dev tun0 scope link 
default via 192.168.0.1 dev wlp4s0 proto dhcp metric 600 
87.54.37.61 via 192.168.0.1 dev wlp4s0 src 192.168.0.9 
169.254.0.0/16 dev wlp4s0 scope link metric 1000 
172.17.5.0/24 dev tun0 scope link 
192.168.0.0/24 dev wlp4s0 proto kernel scope link src 192.168.0.9 metric 600 

$ ifconfig 
enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    ether c8:5b:76:e8:2a:36  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 16  memory 0xb4800000-b4820000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1000  (Local Loopback)
    RX packets 3238  bytes 297728 (297.7 KB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 3238  bytes 297728 (297.7 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1412
    inet 172.17.5.28  netmask 255.255.255.255  destination 172.17.5.28
    inet6 fe80::7d4e:fa72:9b2a:84ae  prefixlen 64  scopeid 0x20<link>
    unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
    RX packets 6  bytes 712 (712.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 54  bytes 3832 (3.8 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.0.9  netmask 255.255.255.0  broadcast 192.168.0.255
    inet6 fe80::e727:a946:6bd5:cc2f  prefixlen 64  scopeid 0x20<link>
    ether f4:8c:50:d0:ed:6e  txqueuelen 1000  (Ethernet)
    RX packets 22268  bytes 13166296 (13.1 MB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 20900  bytes 5395432 (5.3 MB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I've tried to delete the default route by route del default dev tun0 as to this answer: https://askubuntu.com/a/1003324/305690 but I did not obtain internet access by doing this.

How can I achieve internet access while remaining connected to the VPN server?

I'm using Ubuntu 18.04 and the Cisco VPN client vpnc.

1 Answer 1

1

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.
 ....
2
  • These are all very good details, but they are not fit as an Answer.
    – earthmeLon
    Oct 7, 2018 at 1:08
  • Considering a workaround is suggested in this answer, I'll let this one. If you found the solution, don't forget to edit and update your answer. Thank you!
    – jokerdino
    Oct 7, 2018 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.