# reslovconf does not work with Cisco AnyConnect VPN client

## ediap

Hi,

I need to use Cisco AnyConnect VPN client to connect to my company services. I have installed openresolv (providing resolvconf) and dnsmasq to have a local forwarding DNS service. Unfortunately, the Cisco AnyConnect VPN client just replaces the /etc/resolv.conf file as soon as the VPN connection is alive and resolvconf does not notice this fact.

Do you have an idea how to convince the resolvconf so it can detect this new VPN connection and set up /etc/resolv.conf and /etc/dnsmasq-resolv.conf accordingly?

As a side note, the resolvconf works fine with my local WiFi connection and also with the vpnc VPN client.

Thanks in advance for any hints!

/Adam

----------

## UberLord

Ask Cisco to support resolvconf  :Smile: 

----------

## ediap

 *UberLord wrote:*   

> Ask Cisco to support resolvconf 

 

Does it mean the only way to workaround this problem is by writing some post connection scripts that will do what resolvconf does?

That's pretty bad  :Sad: 

Update: I found this bug report with a request for creating an ebuild for the openconnect client, which is an open-source replacement for Cisco's AnyConnect SSL VPN client:

https://bugs.gentoo.org/show_bug.cgi?id=263097

I even compiled this software from a Git repository, but couldn't make it work with my company servers.

----------

## UberLord

 *ediap wrote:*   

>  *UberLord wrote:*   Ask Cisco to support resolvconf  
> 
> Does it mean the only way to workaround this problem is by writing some post connection scripts that will do what resolvconf does?
> 
> That's pretty bad 

 

Yes :/

----------

## ediap

There is hope that openconnect will be a good replacement for Cisco's AnyConnect:

http://git.infradead.org/users/dwmw2/openconnect-csd.git

We are currently working with the author on adding support for "Cisco Secure Desktop", which is the only thing I need to make it work with my company servers.

BTW, what should be added to this open-source client to make it play nicely with resolvconf?

/Adam

----------

## UberLord

Assuming the shell language

```

echo $resolv_conf_contents > /etc/resolv.conf

```

becomes

```

if type resolvconf >/dev/null 2>&1; then

   echo $resolv_conf_contents | resolvconf -a $interface

else

   echo $resolv_conf_contents > /etc/resolv.conf

fi

```

----------

## hammerjv

Was there ever an update to this? Did you get openconnect to work with the cisco VPN?

----------

## ediap

 *hammerjv wrote:*   

> Was there ever an update to this? Did you get openconnect to work with the cisco VPN?

 

Yes. I use openconnect every day to connect to a Cisco VPN gateway in my company. It works quite nicely with the post connection script from vpnc.

----------

