TransWikia.com

Using "sudo openconnect" sets VPN DNS, but Gnome VPN setups don't on Ubuntu 20.04

Ask Ubuntu Asked by Brian Cowan on December 12, 2021

OK, forgive me, but this is my first time posting about openconnect issues. Before my disk crash, I was using Ubuntu 18.04 LTS. I reinstalled it and remembered that to make it connect to my GlobalProtect work VPN, I had to download and rebuild openconnect 8. Yeech… I checked and found that 20.04 includes openconnect 8… Yes!

I tested and was able to initiate a full VPN connection over the command line. I have to sudo to make it work, but that works… However, I wanted to do this from the GUI, and this is where things fall over.

Through some Google-Fu, I found that I had to install a number of network-manager packages to make the GUI work. So, I installed these packages:

network-manager-config-connectivity-ubuntu/focal-updates,focal-updates,now 1.22.10-1ubuntu2.1 all [installed]
network-manager-gnome/focal,now 1.8.24-1ubuntu2 amd64 [installed]
network-manager-openconnect-gnome/focal,now 1.2.6-1 amd64 [installed]
network-manager-openconnect/focal,now 1.2.6-1 amd64 [installed]
network-manager-openvpn-gnome/focal,now 1.8.12-1 amd64 [installed,automatic]
network-manager-openvpn/focal,now 1.8.12-1 amd64 [installed,automatic]
network-manager-pptp-gnome/focal,now 1.2.8-2 amd64 [installed]
network-manager-pptp/focal,now 1.2.8-2 amd64 [installed]
network-manager/focal-updates,now 1.22.10-1ubuntu2.1 amd64 [installed]

Now, I can create a VPN entry using the standard VPN dialogs, and the VPN connects. But does not set DNS at all for the VPN connections. Even if the VPN settings specifically state DNS servers to use.

I’m sure that this is PEBKAC, and that I either don’t have something installed or I missed a configuration step.

My VPN connection settings:

[connection]
id=My VPN
uuid=f4ff9996-9079-4c8e-bbce-fda376ec4bb2
type=vpn
autoconnect=false
permissions=
timestamp=1595512597

[vpn]
authtype=password
autoconnect-flags=0
certsigs-flags=0
cookie-flags=2
enable_csd_trojan=no
gateway=redacted-hostname
gateway-flags=2
gwcert-flags=2
lasthost-flags=0
pem_passphrase_fsid=no
prevent_invalid_cert=no
protocol=gp
reported_os=Linux
stoken_source=disabled
xmlconfig-flags=0
service-type=org.freedesktop.NetworkManager.openconnect

[vpn-secrets]
lasthost=ravpn-njdc.hcl.com

[ipv4]
dns=10.10.10.10;10.10.11.11;
dns-search=
ignore-auto-dns=true
method=auto
never-default=true

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=ignore

[proxy]

One thing I noticed was that sudo openconnect essentially creates a "tun0" interface and sets it up, and the GUI VPN setup uses "vpn0", "vpn1" and such (one interface per VPN).

When I connect via sudo openconnect the DNS settings get added to resolvectl status output, when I use the GUI, DNS settings don’t get added to the specified "vpnX" interface. Any ideas why? Or what I’m missing?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP