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.
13 Answers
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-xxYou 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 we can add
ExecStartPost=/bin/sh -c "cat /var/log/kerio-kvc/debug.log | grep MAC | tail -1 | tr - : |rev|cut -d' ' -f 1|rev| xargs -I {} ip link set kvnet addr {}"to /lib/systemd/system/kerio-kvc.service as a workaround.
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 '\'' &'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.
1