On Thu, Apr 2, 2020 at 6:51 AM David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote: > > On Thu, 2020-04-02 at 15:20 +0200, Grant Williamson wrote: > > Is there a way to specify multiple VPN hosts in the > > NetworkManager-openconnect system-connections profile? > > > > I can see there is a drop down menu option in the connection dialog, > > wondering how to add multiple hosts(if possible)? > > It gets them out of the XML profile which is provided from the > AnyConnect server. > > The xmlconfig key in the VPN date contains that XML, base64-encoded. > Make it look like an AnyConnect profile file. So something like... > > <AnyConnectProfile> > <ServerList> > <HostEntry> > <HostName>My First Server</HostName> > <HostAddress>vpn1.example.com</HostAddress> > </HostEntry> > <HostEntry> > <HostName>My Second Server</HostName> > <HostAddress>vpn2.example.com</HostAddress> > </HostEntry> > </ServerList> > </AnyConnectProfile> > For what it's worth, the GlobalProtect protocol has a similar server list, *if* you connect to the portal interface. OpenConnect will extract the list of gateways, and include them in the XML config, so that you can connect directly to one of them in future invocations via NetworkManager: https://gitlab.com/openconnect/openconnect/blob/HEAD/auth-globalprotect.c#L430-441 (only difference is that I named the outer tag <GPPortal>, since it doesn't appear that anything verifies it) -Dan _______________________________________________ openconnect-devel mailing list openconnect-devel@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/openconnect-devel