I have a laptop and I'm giving the internet to laptop via mobile's wifi (means created hotspot).
The same way , I have PC and I'm giving the internet to PC via some other mobile's USB tethering.
Note : Both mobile have different internet connection . 1st one have JIO and 2nd have Airtel.
Now, in laptop where my Openvpn server is running I got IP address like 192.168.72.xx and the client means on PC i got 192.168.60.xx. also VPN tunnel is set on 10.8.0.0.
I got the pubilc IP of server by tying what is my IP in google. I added this in client.conf but not bale to connect to openvpn server.
Can anyone help me ? what is that I'm doing wrong here ??
Server config
port 1194
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn//keys/server.crt
key /etc/openvpn/keys/server.key # This file should be kept secret
dh /etc/openvpn/keys/dh2048.pem
Both mobile have different internet connection . 1st one have JIO and 2nd have Airtel.
Now, in laptop where my Openvpn server is running I got IP address like 192.168.72.xx and the client means on PC i got 192.168.60.xx. also VPN tunnel is set on 10.8.0.0.
I got the pubilc IP of server by tying what is my IP in google
you need to call to your mobile phone which you make hotspot for your server connect to open port first , and from hot spot on your mobile phone you need using iptables to fordward port to your server so after that you can connec from client to your server .
nobody try to make server running from hop spot from the phone , if you want to do that the best is rent a host on the net and make site to site connection so from everywhere you can connect.
if you want to run server you need to have an static ip or at least real ip on internet , mobile phone provider never give to you a real ip address how can you connect ?
he doesnt have internet sevice provider at all , he want to use sim card for internet connection and get internet from simcard , i told you cant do it , there is no way you can do it , simcar internet dont give you real ip address so you cant connect to it , they use CG-NAT so forget what you want to do , just buy vpn somewhene to use it and make site to site connection so from two point you can communication