Tuesday, November 04, 2014

Cisco AnyConnect Secure Mobility Client list of networks drop down

Using the Cisco AnyConnect Secure Mobility Client vesion 3.1.04066, I found the first network you connect to is the only network that is automatically retained in the VPN drop down list.  I regularly need to connect to dozens of networks to provide support, so being able to populate that list and refer to it later is very helpful.

The older Cisco VPN Client allowed for a pretty simple method to add or import profiles.  Each network profile was stored in a seperate PCF file.  This would allow you to maintain a list of locations / networks in the client that you could connect to simply by choosing one on a list.

The newer Cisco AnyConnect Secure Mobility Client doesn't use provide the same method to create or maintain a list of networks. There is a drop down list though, so how does a user populate it?

On a Windows 7 machine you will find a single XML file in the C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile folder. The one on my machine is called AnyConnect_Essentials_client_profile.xml.

In that file you will find a section that looks something like:

    <ServerList>
        <HostEntry>
            <HostName>vpn.thefirstcompanyiconnectedto.com</HostName>
            <HostAddress>vpn.thefirstcompanyiconnectedto.com</HostAddress>
        </HostEntry>
    </ServerList>

I found that if you simply add a second HostEntry section, the VPN client drop down list will include the second network you want to connect to.

    <ServerList>
        <HostEntry>
            <HostName>vpn.thefirstcompanyiconnectedto.com</HostName>
            <HostAddress>vpn.thefirstcompanyiconnectedto.com</HostAddress>
        </HostEntry>
        <HostEntry>
            <HostName>vpn.iaddedthismanually.com</HostName>
            <HostAddress>vpn.iaddedthismanually.com</HostAddress>
        </HostEntry>
    </ServerList>

Choose you entry from the list, click connect and Ta-Da!