Kerio VPN Client Connect but not work in 21.04

In Ubuntu 21.04 latest version of the Kerio VPN client (kerio-control-vpnclient-9.3.6-5738-linux-amd64.deb) is connected but not work and even the gateway of VPN not reach. I think some network changes affect Kerio VPN networking.


Solution 1:

Using Lucas comment I somehow found a workaround. First open /var/log/kerio-kvc/debug.log file in an editor and search for mac. You will see something like this:

[02/Jul/2021 23:22:51] {vpnCore} VPN driver opened, version = 2.1, ifIndex = 22 (0x16), MAC xx-xx-xx-xx-xx-xx

You might find several matches but use the last one. Convert xx-xx-xx-xx-xx-xx to xx:xx:xx:xx:xx:xx. Set kvnet interface mac manually:

sudo ip link set kvnet addr xx:xx:xx:xx:xx:xx

Solution 2:

Base on the suggestion above, I created this alias as workaround:

alias vpn='sudo service kerio-kvc restart && cat /var/log/kerio-kvc/debug.log | grep MAC | tail -1 | tr - : > grep.txt ; sudo ip link set kvnet addr `N=17; grep -o ".\{$N\}$" <grep.txt` &&   /usr/bin/google-chrome '\''http://[KERIO_SERVER]:4080//nonauth/totpVerify.cs'\'' &'

I am no expert in bash scripting; surely there is a way of doing this without writing it to a file. However, this is fully automated.