Start searching this forum for “openvpn”. Basic steps are:
- Install openvpn server on OSMC
- Configure Server
- Create certificates
- transfer certifcates and configuration to your clients (install the openvpn client software)
To connect remotely you then also would need some kind of DynDNS