title: nameservers update differently with openconnect and openconnect-gnome in ubuntu 18.04
body: <p>This seems to be a new issue with <code>network-manager-openconect-gnome</code> in Ubuntu 18.04+</p>
  
  <p>I install <code>sudo apt install network-manager-openconnect-gnome</code> to get gnome integration with opeconnect and <em>Cisco AnyConnect Compatible VPN (openconnect)</em></p>
  
  <p>As an aside (which may <em>actually</em> be relevant) I do this to get <code>*.local</code> addresses to resolve:</p>
  
  <ul>
  <li><code>sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf</code> <a href="https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html" rel="nofollow noreferrer">as per systemd docs</a></li>
  <li>Move <code>dns</code> before <code>mdns4_minimal</code> in <code>/etc/nsswitch.conf</code></li>
  </ul>
  
  <p>If I connect to the VPN with openconnect through the gnome network manager, VPN addresses (sites for work) do not resolve. Regular sites continue to work as expected. </p>
  
  <p>If I connect to the VPN with openconnect on the command line with <code>sudo openconnect vpn.mycompany.com</code>, VPN addresses (sites for work) <strong>do</strong> resolve. Regular sites continue to work as expected. </p>
  
  <p>I thought I would check to see if there were any differences between <code>/etc/resolv.conf</code> with each of these VPN connection methods and sure enough, there is one:</p>
  
  <p><strong>openconnect on the command line</strong> (working):</p>
  
  <pre><code>#@VPNC_GENERATED@ -- this file is generated by vpnc
  # and will be overwritten by vpnc
  # as long as the above mark is intact
  # This file is managed by man:systemd-resolved(8). Do not edit.
  #
  # This is a dynamic resolv.conf file for connecting local clients directly to
  # all known uplink DNS servers. This file lists all configured search domains.
  #
  # Third party programs must not access this file directly, but only through the
  # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
  # replace this symlink by a static file or a different symlink.
  #
  # See man:systemd-resolved.service(8) for details about the supported modes of
  # operation for /etc/resolv.conf.
  
  nameserver 10.10.10.10
  nameserver 10.10.10.11
  search broadband mycompany.com
  </code></pre>
  
  <p><strong>openconnect gnome integration</strong> (not working):</p>
  
  <pre><code># This file is managed by man:systemd-resolved(8). Do not edit.
  #
  # This is a dynamic resolv.conf file for connecting local clients directly to
  # all known uplink DNS servers. This file lists all configured search domains.
  #
  # Third party programs must not access this file directly, but only through the
  # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
  # replace this symlink by a static file or a different symlink.
  #
  # See man:systemd-resolved.service(8) for details about the supported modes of
  # operation for /etc/resolv.conf.
  
  nameserver 192.168.1.1
  nameserver 10.10.10.10
  nameserver 10.10.10.11
  search broadband mycompany.com
  </code></pre>
  
  <p>If I remove (or comment out) the nameserver <code>192.168.1.1</code>, which is the difference in content between the working and not working files... everything works as expected. I can resolve addresses within the company and regular sites work as expected. </p>
  
  <p>This does not happen with Fedora. Everything works out of the box. I'm not sure why the <code>network-manager-openconnect-gnome</code> package works differently or if there's a way I can make it work without either</p>
  
  <ul>
  <li>Editing the file by hand.</li>
  <li>Using the <code>openconnect</code> tool from the command line and keeping a terminal open running that command.  </li>
  </ul>