I was looking for a way to disable the setting of «Trusted Servers» on my Cisco AnyConnect Secure Mobility Client Version (version 4.7.00136) specifically.

Through the graphical user interface is easy to change, but ¿where is stored that configuration?

AnyConnect client v. 4.7

AnyConnect client v. 4.7

The «three profile» settings

At first I went to /opt/cisco/anyconnect/profile/ANYCONNECT_Client_Profile.xml because there was stored the value of the server to connect under the <HostAddress> tag, but no clue for any «Untrusted Setting».

After changing the setting through the GUI the file /opt/cisco/anyconnect/.anyconnect_global was touched but nothing changed on it.

Finally I found that the setting was being stored in my user at /home/myuser/.anyconnect with the tag <BlockUntrustedServers>

¿How I found it was that file?

First I’ve investigated which binaries had something to do with «Block», the binary in charge of it was vpn:

Then I executed the binary with the parameters to change the setting using a strace to see which files were called:

It tried to open several files but wrote in one that called my attention:

After checking its content it was clear that the setting was stored there.

The real question is ¿why the client stores the information of the url you are connecting in one profile settings under /opt and then saving the other setting in your /home/user/ file?

That has not any sense, but well, at least I was able to change it.