when connecting to an openvpn server (at least on ubuntu 20.04) you lose your dns server, meaning you’re not able to access any remote hosts via ip.
you can basically sucessfully ping 126.96.36.199, but if you ping google.com it will fail, because it cannot translate google to an ip.
the solution is here:
basically install openresolv
sudo apt-get install -y openresolv
add the instructions in the openvpn config file to update the dns after connection.
# This updates the resolvconf with dns settings setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin script-security 2 up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-conf down-pre