- Mahidol VPN is Juniper Pulse VPN
- Ubuntu network connection is managed by Network Manager
sudo apt install openconnect libopenconnect5 network-manager-openconnect network-manager-openconnect-gnome
After that, in Network Manage:
- create VPN "Cisco AnyConnect Compatible VPN (openconnect)"
- change VPN Protocol to "Juniper/Pulse Network Connect"
- change Gateway to "https://vpn.mahidol.ac.th/dana-na/auth/url_default/welcome.cgi"
- leave the rest as default (blanks and nones)
Unfortunately, when trying to connect the input boxes cannot be parsed successfully. There is a missing input box, named "username", because of misconfiguration on HTML like this.
<input type="username" name="username" placeholder="firstname.sur or uxxxx or gxxxx">
The log error appears as: Ignoring unknown form input type 'username'
The good news is in the new OpenConnect (currently v.8.08) is able to parse 'type="username"'. (see file auth-juniper.c in the source code)
sudo apt install git build-essentials automake libssl-dev
git clone git://git.infradead.org/users/dwmw2/openconnect.git
cd openconnect
./autogen.sh
./configure
make
sudo make install
The installed files are in /usr/local/sbin, /usr/local/lib, and /usr/local/shared. Just need to copy to /usr/sbin, /usr/lib to overwrite the version from Ubuntu package manager.
sudo cp /usr/local/sbin/openconnect /usr/sbin/
sudo cp /usr/local/lib/libopenconnect* /usr/lib/x86_64-linux-gnu/
cd /usr/lib/x86_64-linux-gnu/
sudo rm libopenconnect.so libopenconnect.so.5
sudo ln -s libopenconnect.so.5.6.0 libopenconnect.so
sudo ln -s libopenconnect.so.5.6.0 libopenconnect.so.5
(P.S. current version produces "libopenconnect.so.5.6.0" file)