Then you setup an openvpn client on your samba share using this openssl key so your client connect to your openvpn server and got the dedicated IP address.
![openvpn ports to forward openvpn ports to forward](https://fiverr-res.cloudinary.com/images/t_delivery_large/t_smartwm,q_auto,f_auto/deliveries/9449571/original/support-it-services_ws_1433659086/install-openvpn-server-in-your-vps.png)
So 192.168.2.6 will be the dedicated IP for your samba4Gshare and 192.168.2.5 will be used internally by openvpn for connections with this client.(be aware that openvpn by default use some /30 internal subnets so you have to segment your internal LAN in some /30)
![openvpn ports to forward openvpn ports to forward](https://www.cyberciti.biz/media/new/faq/2020/04/OpenVPN-verify-NAT-and-firewall-forwarding-rules-on-Linux.png)
If your client key name is samba4Gshare then create a file /etc/openvpn/ccd/samba4GshareĪnd put in it some dedicated IP address (for example if your openvpn internal lan is 192.168.2.0/24) ifconfig-push 192.168.2.6 192.168.2.5 That is, in your openvpn nf just add client-config-dir ccd It is a matter of port forwarding, so you first have to control what internal IP address you give to your 4G client, you can do this by using openssl key, and setup a special profile with a dedicated address attached to this special key using the ccd directory and making a file named after the key in that directory. You can do what you asked for, here is some instructions to achieve it.