0

Basically this question has been asked before, albeit with a different flag/argument, and it's been a few years.

Since the people who administer my local network have apparently misconfigured IPv6, I need to manually specify an IPv4 address that I want my VPN gateway to resolve to. This can be done using openconnect --resolve=HOST:IP gateway.

Is it possible to have Network Manager use the --resolve=HOST:IP argument? I tried adding the value pair to the [vpn] section of the .nmconnection file for the VPN, but it just ignored it (and yes, I did reload the file).

1 Answers1

0

You might have already figured this out by the absence of answers, but at the moment of writing network-manager-openconnect does not have an option to add the --resolve option to the list of command line arguments when running openconnect.

If you feel adventurous though, you could hack this in the source by:

# Get the build dependencies
sudo apt-get build-dep network-manager-openconnect
# Download sources
mkdir ~/nmo ; cd ~/nmo
apt source network-manager-openconnect
cd network-manager-openconnect-1.2.6/
# Edit nm-openconnect-service.c in lines 451 - 519
# Compile:
./configure
make
# Install:
mv /usr/lib/NetworkManager/nm-openconnect-service /usr/lib/NetworkManager/nm-openconnect-service.bak
cp src/nm-openconnect-service /usr/lib/NetworkManager/nm-openconnect-service
# Restart networkmanager:
sudo service network-manager restart

For a quick hack your changes could look something like:

g_ptr_array_add (openconnect_argv, (gpointer) "--resolve=HOST:IP");

On line 480 or so.

Veda
  • 343